summaryrefslogtreecommitdiff
path: root/drivers/firmware
diff options
context:
space:
mode:
authorLeonard Crestez <leonard.crestez@nxp.com>2020-02-20 19:29:35 +0300
committerShawn Guo <shawnguo@kernel.org>2020-02-24 10:26:55 +0300
commit7c1a1c814ccc858633c761951c2546041202b24e (patch)
treee1adc00230f85c8104c9b927a2aa1f25a9c28f32 /drivers/firmware
parent1e6a4eba693ac72e6f91b4252458c933110e5f4c (diff)
downloadlinux-7c1a1c814ccc858633c761951c2546041202b24e.tar.xz
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: c800cd7824bd ("firmware: imx: add SCU power domain driver") Signed-off-by: Leonard Crestez <leonard.crestez@nxp.com> Signed-off-by: Shawn Guo <shawnguo@kernel.org>
Diffstat (limited to 'drivers/firmware')
-rw-r--r--drivers/firmware/imx/scu-pd.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/firmware/imx/scu-pd.c b/drivers/firmware/imx/scu-pd.c
index b556612207e5..af3ae0087de4 100644
--- a/drivers/firmware/imx/scu-pd.c
+++ b/drivers/firmware/imx/scu-pd.c
@@ -61,7 +61,7 @@ struct imx_sc_msg_req_set_resource_power_mode {
struct imx_sc_rpc_msg hdr;
u16 resource;
u8 mode;
-} __packed;
+} __packed __aligned(4);
#define IMX_SCU_PD_NAME_SIZE 20
struct imx_sc_pm_domain {