Skip to content

Commit 7c1a1c8

Browse files
cdleonardShawn Guo
authored andcommitted
firmware: imx: scu-pd: 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: c800cd7 ("firmware: imx: add SCU power domain driver") Signed-off-by: Leonard Crestez <[email protected]> Signed-off-by: Shawn Guo <[email protected]>
1 parent 1e6a4eb commit 7c1a1c8

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

drivers/firmware/imx/scu-pd.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ struct imx_sc_msg_req_set_resource_power_mode {
6161
struct imx_sc_rpc_msg hdr;
6262
u16 resource;
6363
u8 mode;
64-
} __packed;
64+
} __packed __aligned(4);
6565

6666
#define IMX_SCU_PD_NAME_SIZE 20
6767
struct imx_sc_pm_domain {

0 commit comments

Comments
 (0)