]> git.baikalelectronics.ru Git - kernel.git/commitdiff
soc: imx: imx-scu: Getting UID from SCU should have response
authorAnson Huang <Anson.Huang@nxp.com>
Wed, 4 Sep 2019 19:13:14 +0000 (15:13 -0400)
committerShawn Guo <shawnguo@kernel.org>
Sun, 6 Oct 2019 01:21:38 +0000 (09:21 +0800)
The SCU firmware API for getting UID should have response,
otherwise, the message stored in function stack could be
released and then the response data received from SCU will be
stored into that released stack and cause kernel NULL pointer
dump.

Fixes: b61926341025 ("soc: imx-scu: Add SoC UID(unique identifier) support")
Signed-off-by: Anson Huang <Anson.Huang@nxp.com>
Signed-off-by: Shawn Guo <shawnguo@kernel.org>
drivers/soc/imx/soc-imx-scu.c

index 50831ebf126afcdc2ea26e5c2d1db98e05cd0afa..c68882eb80f778e93bf7b1e29cc18b8e06f44d7a 100644 (file)
@@ -46,7 +46,7 @@ static ssize_t soc_uid_show(struct device *dev,
        hdr->func = IMX_SC_MISC_FUNC_UNIQUE_ID;
        hdr->size = 1;
 
-       ret = imx_scu_call_rpc(soc_ipc_handle, &msg, false);
+       ret = imx_scu_call_rpc(soc_ipc_handle, &msg, true);
        if (ret) {
                pr_err("%s: get soc uid failed, ret %d\n", __func__, ret);
                return ret;