From patchwork Fri Jun 25 12:33:51 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Manivannan Sadhasivam X-Patchwork-Id: 466853 Delivered-To: patch@linaro.org Received: by 2002:a02:c94a:0:0:0:0:0 with SMTP id u10csp1417826jao; Fri, 25 Jun 2021 05:35:07 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzqSCGsu+0TFNDsVt6uypTkAMy77wJE51DiTzz9nKY5YDbcFrFCiCmPP8ZFCCxFjA5Pyc6/ X-Received: by 2002:a17:906:a843:: with SMTP id dx3mr6353509ejb.487.1624624506917; Fri, 25 Jun 2021 05:35:06 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1624624506; cv=none; d=google.com; s=arc-20160816; b=zvvEl2iSlOMTtdV5urnPTDyC22Og4iDvvR/tsXW7qQ79L4S2ch3sKiwhP7qAZSE8Yi Pivxu/OLmdGVNwojI7X71QmGPkJGuM2+ay/6qvUkDEE/Z097kyF673mLMFgcAr8dD7MP cxk+7Y5efq3U2qfku8ZECfC8v3q4NzpiA1pamwt8kOjodoVhHd1TdoXgY8yZahBzanG4 AObg0vrpBYPdJflu51zTTGxHhJEDO7loaE1Tap9hW8jj9/RKzY3bx7/C3164B6SlVN9v gLzDE+nO4vZXuVIBcEOvGGDf0KLInQW4xeU+nSvbIUkIe4M9fm4Um7kq7reEdIzRXXi2 kckg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=sNO7OvoezOyKwRQqQPCTAGHXfd3P08Ex5P2XMikHwWs=; b=rsFc4/p4xAZkNFV8hGrW1wZha+q65mytivtrh6gKeztJQrDLaksI9MKFgY5sLA77wG x6yhoBBQDecVeFpbQkIRjcjfOq4TNDa3NOzabWea7tndAUjloP9So755KD/fd+LbeyjS qE/lS+4+gQTPNQla4sykZRDqhegHZnt4oiPVBBcxZa40XDCGnO1T5iBqcrS+lMtjqw5Z DBvCoq9ttzPbZb48GGvLxucO+TWabAp2p/CNeZ/Nxsvo5ITRo7U747zLYiAhoVZ4WLNw 9soauNENYZWPMeaKdCKfeAGmi/Tsg/o0K0yH8dgosnYecXbglG0ltAd6rF81fb+PDtQl liJg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=e9MtdpfG; spf=pass (google.com: domain of stable-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=stable-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id 28si5822157ejk.511.2021.06.25.05.35.06; Fri, 25 Jun 2021 05:35:06 -0700 (PDT) Received-SPF: pass (google.com: domain of stable-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=e9MtdpfG; spf=pass (google.com: domain of stable-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=stable-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231526AbhFYMhU (ORCPT + 12 others); Fri, 25 Jun 2021 08:37:20 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:59868 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231569AbhFYMhL (ORCPT ); Fri, 25 Jun 2021 08:37:11 -0400 Received: from mail-pf1-x42a.google.com (mail-pf1-x42a.google.com [IPv6:2607:f8b0:4864:20::42a]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 45172C0613A4 for ; Fri, 25 Jun 2021 05:34:46 -0700 (PDT) Received: by mail-pf1-x42a.google.com with SMTP id 21so7953886pfp.3 for ; Fri, 25 Jun 2021 05:34:46 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=sNO7OvoezOyKwRQqQPCTAGHXfd3P08Ex5P2XMikHwWs=; b=e9MtdpfGHP20g++UmMZA7v/PwkSWPmVAUxQ1kUZC76KT2yBOov0+XQs6prxQxXR2JU J0RlewuEWXnVf2dy2yeBZdZvVDfV1jC9PF/xziGneT/XMx/iRdxdAEc1r96xrIy9l816 0FUtsFEgPVbP2Xzfvlg3QF9t/1vkQYKDmQATgckKnyMnzIATgGlSYnDkUEwedWOUS8QP H/5EMgjlapCD/mrgLvIj1zFWhWCdZo4jYMFjww3c4QC8gjDF54bKWDxx9HVEicB4mjjK l/AVlaKHWQaTME7XvE/XUSA8Lu219Qp/aiGadiyAhw1kKyHSIgoqN+r9Cl7BBUEHpIWf QHnQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=sNO7OvoezOyKwRQqQPCTAGHXfd3P08Ex5P2XMikHwWs=; b=rp5kLbeYzmgmi4xQCYm9G9cOaBKeNCi5fPsE4J2q+IqGFPq5bfsuup8YC7De2NdmeC IWftmoGFa10uXX/rhUBuRyMS+ek3sohb944HAVB2wVRx7s8bTlEHmq4Co4sBgrMO1unG SWjwYMQYstkAAQo2d0ChUxAKnCrrV/RDeA3RgnJF0hTdKXa7Ktvikqe+U+JCXruSsN4x VWgc5ASV8CRRbQ+zl1J5W+TBaoGC4/JjI02ZttaWA/WpJhB+5EHdDT0OypsftgMFDBoV mxo9ca6y5i+tACLWZEHbdDECJp/8wPy6TSIXP+yfIylHxJzPsvhasi6Mj1Wx16pIyXp2 5E5Q== X-Gm-Message-State: AOAM532DCiWXVUMXLwTJDHJfoVAiaVZ0fL4+3gk5lnjLJMz4s6e/E+m0 fOU3TnabKmqejvMjSIWQAtS4 X-Received: by 2002:a63:7404:: with SMTP id p4mr9338107pgc.405.1624624485806; Fri, 25 Jun 2021 05:34:45 -0700 (PDT) Received: from localhost.localdomain ([2409:4072:600b:2a0:ed5d:53e7:c64e:1bac]) by smtp.gmail.com with ESMTPSA id y7sm6077780pfy.153.2021.06.25.05.34.39 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 25 Jun 2021 05:34:45 -0700 (PDT) From: Manivannan Sadhasivam To: gregkh@linuxfoundation.org Cc: hemantk@codeaurora.org, bbhatt@codeaurora.org, linux-arm-msm@vger.kernel.org, jhugo@codeaurora.org, linux-kernel@vger.kernel.org, loic.poulain@linaro.org, kvalo@codeaurora.org, ath11k@lists.infradead.org, stable@vger.kernel.org, Jeffrey Hugo , Manivannan Sadhasivam Subject: [PATCH 06/10] bus: mhi: core: Set BHI and BHIe pointers to NULL in clean-up Date: Fri, 25 Jun 2021 18:03:51 +0530 Message-Id: <20210625123355.11578-7-manivannan.sadhasivam@linaro.org> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20210625123355.11578-1-manivannan.sadhasivam@linaro.org> References: <20210625123355.11578-1-manivannan.sadhasivam@linaro.org> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: stable@vger.kernel.org From: Bhaumik Bhatt Set the BHI and BHIe pointers to NULL as part of clean-up. This makes sure that stale pointers are not accessed after powering MHI down. Cc: stable@vger.kernel.org Suggested-by: Hemant Kumar Signed-off-by: Bhaumik Bhatt Reviewed-by: Jeffrey Hugo Reviewed-by: Hemant Kumar Reviewed-by: Manivannan Sadhasivam Link: https://lore.kernel.org/r/1620330705-40192-3-git-send-email-bbhatt@codeaurora.org Signed-off-by: Manivannan Sadhasivam --- drivers/bus/mhi/core/init.c | 3 +++ 1 file changed, 3 insertions(+) -- 2.25.1 diff --git a/drivers/bus/mhi/core/init.c b/drivers/bus/mhi/core/init.c index 11c7a3d3c9bf..1cc2f225d3d1 100644 --- a/drivers/bus/mhi/core/init.c +++ b/drivers/bus/mhi/core/init.c @@ -1132,6 +1132,9 @@ void mhi_unprepare_after_power_down(struct mhi_controller *mhi_cntrl) mhi_cntrl->rddm_image = NULL; } + mhi_cntrl->bhi = NULL; + mhi_cntrl->bhie = NULL; + mhi_deinit_dev_ctxt(mhi_cntrl); } EXPORT_SYMBOL_GPL(mhi_unprepare_after_power_down);