提交 8400ab88 编写于 作者: L Leonard Crestez 提交者: Stephen Boyd

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: 666aed2d ("clk: imx: scu: add set parent support")
Signed-off-by: NLeonard Crestez <leonard.crestez@nxp.com>
Link: https://lkml.kernel.org/r/aad021e432b3062c142973d09b766656eec18fde.1582216144.git.leonard.crestez@nxp.comSigned-off-by: NStephen Boyd <sboyd@kernel.org>
上级 a0ae04a2
......@@ -84,7 +84,7 @@ struct imx_sc_msg_get_clock_parent {
struct req_get_clock_parent {
__le16 resource;
u8 clk;
} __packed req;
} __packed __aligned(4) req;
struct resp_get_clock_parent {
u8 parent;
} resp;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册