projects
/
platform
/
kernel
/
linux-starfive.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
a0ae04a
)
clk: imx: Align imx sc clock parent msg structs to 4
author
Leonard Crestez
<leonard.crestez@nxp.com>
Thu, 20 Feb 2020 16:29:33 +0000
(18:29 +0200)
committer
Stephen Boyd
<sboyd@kernel.org>
Thu, 26 Mar 2020 01:46:05 +0000
(18:46 -0700)
The imx SC api strongly assumes that messages are composed out of
4-bytes words but some of our message structs have odd sizeofs.
This produces many oopses with CONFIG_KASAN=y.
Fix by marking with __aligned(4).
Fixes: 666aed2d13ee ("clk: imx: scu: add set parent support")
Signed-off-by: Leonard Crestez <leonard.crestez@nxp.com>
Link:
https://lkml.kernel.org/r/aad021e432b3062c142973d09b766656eec18fde.1582216144.git.leonard.crestez@nxp.com
Signed-off-by: Stephen Boyd <sboyd@kernel.org>
drivers/clk/imx/clk-scu.c
patch
|
blob
|
history
diff --git
a/drivers/clk/imx/clk-scu.c
b/drivers/clk/imx/clk-scu.c
index 3c5c42d8833ee1623a751d7c1778c7477d306ce7..b8b2072742a5608ff6fe7abf0bfbf9a34fdca4f0 100644
(file)
--- a/
drivers/clk/imx/clk-scu.c
+++ b/
drivers/clk/imx/clk-scu.c
@@
-84,7
+84,7
@@
struct imx_sc_msg_get_clock_parent {
struct req_get_clock_parent {
__le16 resource;
u8 clk;
- } __packed req;
+ } __packed
__aligned(4)
req;
struct resp_get_clock_parent {
u8 parent;
} resp;