Skip to content

Commit f10e58a

Browse files
cdleonardShawn Guo
authored andcommitted
soc: imx-scu: Align imx sc 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: 73feb4d ("soc: imx-scu: Add SoC UID(unique identifier) support") Signed-off-by: Leonard Crestez <[email protected]> Signed-off-by: Shawn Guo <[email protected]>
1 parent f5bfeff commit f10e58a

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

drivers/soc/imx/soc-imx-scu.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ struct imx_sc_msg_misc_get_soc_id {
2525
u32 id;
2626
} resp;
2727
} data;
28-
} __packed;
28+
} __packed __aligned(4);
2929

3030
struct imx_sc_msg_misc_get_soc_uid {
3131
struct imx_sc_rpc_msg hdr;

0 commit comments

Comments
 (0)