Skip to content

Commit f5bfeff

Browse files
cdleonardShawn Guo
authored andcommitted
firmware: imx: Align imx_sc_msg_req_cpu_start 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: d90bf29 ("firmware: imx: Add support to start/stop a CPU") Signed-off-by: Leonard Crestez <[email protected]> Signed-off-by: Shawn Guo <[email protected]>
1 parent 7c1a1c8 commit f5bfeff

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

drivers/firmware/imx/misc.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ struct imx_sc_msg_req_cpu_start {
2424
u32 address_lo;
2525
u16 resource;
2626
u8 enable;
27-
} __packed;
27+
} __packed __aligned(4);
2828

2929
struct imx_sc_msg_req_misc_get_ctrl {
3030
struct imx_sc_rpc_msg hdr;

0 commit comments

Comments
 (0)