Received: by 2002:a25:c593:0:0:0:0:0 with SMTP id v141csp350588ybe; Wed, 4 Sep 2019 00:15:34 -0700 (PDT) X-Google-Smtp-Source: APXvYqyBuIbwwO3RzOewT/8lrw9WSHWaqJWvARkYmUovIznsq9Xq0haGcFF350cAMLqZoN59MPAv X-Received: by 2002:a17:902:20cc:: with SMTP id v12mr36382205plg.188.1567581334295; Wed, 04 Sep 2019 00:15:34 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1567581334; cv=none; d=google.com; s=arc-20160816; b=T7pRcBZ79tSM1NYVRXttqt+Mz81lggU4+TLckUl8AbKP/5G8u6S9BL376C+t5Pe4tl clZJH8/xtde2g0gkdqZWVQ/lI14mzVTe2nCCsBnAE/bSTOQpufSEgqvYK+5+4GMehNGx rYSUckv06Fq6CzYVZPdvgSonFk6SOcc0xNwpQlx6a4CDeirKxYcy1FWZbWlgN556Z7A/ 1E53YqRUBZpx9GVtHKsIARMRGvd9DPNKojkGOGQwgb0HgzyWKQ42jzUCqeQyU2j340S9 y2AYTtRLE3aYfJXL9EH6S9PuyeZ79J2mLCqPN8r4G51SKMnpdL8zwqEreM3rXBEtDELy kt4w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:message-id:date:subject:cc:to:from; bh=DSyfbBxEesZWpmUw3a5q6SKusUimnt6Afq87LZB7zQA=; b=HPYb+LsnBS+2Pj9Tnj7HJ3VVeQv4VGRYvSEPNENjaFHNnYq40lzv5jVW1Gspior4DP b8CyA49zuBqKST0yE8jT2Zix61HTed4yQ5vbLs2onHnGugZYHDPpKZPu3xX6sxQHJLoJ 0kZdbDwaU149tGLl9t38kIHcjlo7JLdrL46L8qMEzrwsdicrGMyY3GwUnKVY63zx03uo cXDK/Fj7LAPAfCOGS+ZscP6F0V+ZbozDpx1kBCule+CapTZ44E6gjPNGNJZnBHNYAvuk 0Sd+Cm6XFp8wTT4jiqt0ri48e3qywDtA1ZcnoVPZTUdQ2MxfTJb+h89ra2REUmL8hQsB 5hJQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=nxp.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id q18si16758703pgk.31.2019.09.04.00.15.17; Wed, 04 Sep 2019 00:15:34 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=nxp.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728922AbfIDHOM (ORCPT + 99 others); Wed, 4 Sep 2019 03:14:12 -0400 Received: from inva020.nxp.com ([92.121.34.13]:47746 "EHLO inva020.nxp.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725938AbfIDHOM (ORCPT ); Wed, 4 Sep 2019 03:14:12 -0400 Received: from inva020.nxp.com (localhost [127.0.0.1]) by inva020.eu-rdc02.nxp.com (Postfix) with ESMTP id 85BFE1A0063; Wed, 4 Sep 2019 09:14:10 +0200 (CEST) Received: from invc005.ap-rdc01.nxp.com (invc005.ap-rdc01.nxp.com [165.114.16.14]) by inva020.eu-rdc02.nxp.com (Postfix) with ESMTP id EC30A1A0194; Wed, 4 Sep 2019 09:14:05 +0200 (CEST) Received: from localhost.localdomain (shlinux2.ap.freescale.net [10.192.224.44]) by invc005.ap-rdc01.nxp.com (Postfix) with ESMTP id 09A5540296; Wed, 4 Sep 2019 15:13:59 +0800 (SGT) From: Anson Huang To: shawnguo@kernel.org, s.hauer@pengutronix.de, kernel@pengutronix.de, festevam@gmail.com, daniel.baluta@nxp.com, aisheng.dong@nxp.com, abel.vesa@nxp.com, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org Cc: Linux-imx@nxp.com Subject: [PATCH] soc: imx: imx-scu: Getting UID from SCU should have response Date: Wed, 4 Sep 2019 15:13:14 -0400 Message-Id: <1567624394-25023-1-git-send-email-Anson.Huang@nxp.com> X-Mailer: git-send-email 2.7.4 X-Virus-Scanned: ClamAV using ClamSMTP Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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: 73feb4d0f8f1 ("soc: imx-scu: Add SoC UID(unique identifier) support") Signed-off-by: Anson Huang --- drivers/soc/imx/soc-imx-scu.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/soc/imx/soc-imx-scu.c b/drivers/soc/imx/soc-imx-scu.c index 50831eb..c68882e 100644 --- a/drivers/soc/imx/soc-imx-scu.c +++ b/drivers/soc/imx/soc-imx-scu.c @@ -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; -- 2.7.4