Skip to content

Commit 8400ab8

Browse files
cdleonardbebarino
authored andcommitted
clk: imx: Align imx sc clock parent msg structs to 4
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: 666aed2 ("clk: imx: scu: add set parent support") Signed-off-by: Leonard Crestez <[email protected]> Link: https://lkml.kernel.org/r/aad021e432b3062c142973d09b766656eec18fde.1582216144.git.leonard.crestez@nxp.com Signed-off-by: Stephen Boyd <[email protected]>
1 parent a0ae04a commit 8400ab8

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

drivers/clk/imx/clk-scu.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,7 @@ struct imx_sc_msg_get_clock_parent {
8484
struct req_get_clock_parent {
8585
__le16 resource;
8686
u8 clk;
87-
} __packed req;
87+
} __packed __aligned(4) req;
8888
struct resp_get_clock_parent {
8989
u8 parent;
9090
} resp;

0 commit comments

Comments
 (0)