From nobody Fri Sep 25 16:51:19 2026 Received: from smtpbgsg1.qq.com (smtpbgsg1.qq.com [54.254.200.92]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id E675A3845D3; Thu, 10 Sep 2026 06:55:39 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=54.254.200.92 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1789023343; cv=none; b=WtX6cHPezS0Rw9rJon+Jb7HVGQJOh1RUFGPbIM7cyaDBPXkmzucslmptAyouVT/xXSqtLzAeEwyznGky9+gMrYUCoCGhxmgsaAdYmEp2sCgNNd3DY/xylrrQ4xXbN3GRJp+5c5ig7QqY4r5vsfaRPSYYBXJN/6g5GmDiuzabRLg= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1789023343; c=relaxed/simple; bh=JbJ0jb4ejrFmyQLGc2y25VOtYx2Utyegas11w/+uOLA=; h=From:To:Cc:Subject:Date:Message-Id:MIME-Version; b=Uw/1RAkyK2ObaR+S5TRgjpv60SwB4fTpW6No+EoF6imnPLSCvQedTSFFKeyTUqjfikJHst9pCFy/h6Gr9Zp3EgQebtfuSAc3X1K0fSkefQo+1KRe1xIB49eRhbMQKodXrjZMMkhD2z6eU2W/0C8qiF+Owav/3C9LVrUJNcU1SSs= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=uniontech.com; spf=pass smtp.mailfrom=uniontech.com; dkim=pass (1024-bit key) header.d=uniontech.com header.i=@uniontech.com header.b=Pw8xYkIn; arc=none smtp.client-ip=54.254.200.92 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=uniontech.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=uniontech.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=uniontech.com header.i=@uniontech.com header.b="Pw8xYkIn" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=uniontech.com; s=onoh2408; t=1789023292; bh=uTV/qjut2EJ2HSX5Racn0nEgdyfczq3XC0HT2J7tQJ8=; h=From:To:Subject:Date:Message-Id:MIME-Version; b=Pw8xYkInqTFVGkaQo9KeLd1+skui5OlfdikTMjNF9Jf6/F96iPLxJeW/TCkIZuhIL 4W60bxY5oS+6HGVBCmEC/sqfmTCu/rRZSPSBuHdmQEJeIRalbfZJa41uJRxvunwex5 1XPmimzYeMQzWnMGznAP1vpBRo6ICZ9059FulCL4= X-QQ-mid: zesmtpgz4t1789023273ta1fbe3da X-QQ-Originating-IP: xX/ut/FNG2CYqFuk52gzzhzwcGrktHAvSAisDQIiWWM= Received: from localhost.localdomain ( [113.57.152.160]) by bizesmtp.qq.com (ESMTP) with id ; Thu, 10 Sep 2026 14:54:31 +0800 (CST) X-QQ-SSF: 0000000000000000000000000000000 X-QQ-GoodBg: 1 X-BIZMAIL-ID: 8036773416646181260 EX-QQ-RecipientCnt: 10 From: Wentao Guan To: sashal@kernel.org, jgg@nvidia.com Cc: will@kernel.org, linux-arm-kernel@lists.infradead.org, iommu@lists.linux.dev, stable@vger.kernel.org, linux-kernel@vger.kernel.org, nicolinc@nvidia.com, skolothumtho@nvidia.com, Wentao Guan Subject: [PATCH 7.2.y] iommu/arm-smmu-v3: Disable implementations during devm teardown Date: Thu, 10 Sep 2026 14:54:29 +0800 Message-Id: <20260910065429.1703706-1-guanwentao@uniontech.com> X-Mailer: git-send-email 2.30.2 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-QQ-SENDSIZE: 520 Feedback-ID: zesmtpgz:uniontech.com:qybglogicsvrgz:qybglogicsvrgz3a-0 X-QQ-XMAILINFO: OJaSdNvGbayWw4qAVkkuh1KpQ/b2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= X-QQ-XMRINFO: NyFYKkN4Ny6FuXrnB5Ye7Aabb3ujjtK+gg== X-QQ-RECHKSPAM: 0 Content-Type: text/plain; charset="utf-8" The Tegra241 CMDQV teardown fix moved VINTF hardware deinitialization into the implementation device_disable() callback. However, its stable backport preceded the conversion to devm teardown and could only invoke the callback from the shutdown path. Now that arm_smmu_disable_action() manages normal teardown, invoke the implementation callback there while the command queue is still alive. This prevents the subsequent implementation remove action from releasing resources while the CMDQV hardware remains active. After ("iommu/arm-smmu-v3: Manage teardown with devm") merged in stable, now keep the shutdown path consistent with mainline, where disabling the base SMMU is sufficient. It is a fix for stable tree commit to aligned with mainline, so no upstream commit id here. Fixes: 5994617e09ee ("iommu/tegra241-cmdqv: Fix CMD_SYNC use-after-free on = teardown") Signed-off-by: Wentao Guan Acked-by: Nicolin Chen --- drivers/iommu/arm/arm-smmu-v3/arm-smmu-v3.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/iommu/arm/arm-smmu-v3/arm-smmu-v3.c b/drivers/iommu/ar= m/arm-smmu-v3/arm-smmu-v3.c index c993e101fab3a..ea908afb0da9d 100644 --- a/drivers/iommu/arm/arm-smmu-v3/arm-smmu-v3.c +++ b/drivers/iommu/arm/arm-smmu-v3/arm-smmu-v3.c @@ -4789,6 +4789,8 @@ static void arm_smmu_disable_action(void *data) { struct arm_smmu_device *smmu =3D data; =20 + if (smmu->impl_ops && smmu->impl_ops->device_disable) + smmu->impl_ops->device_disable(smmu); arm_smmu_device_disable(smmu); } =20 @@ -5621,8 +5623,6 @@ static void arm_smmu_device_shutdown(struct platform_= device *pdev) { struct arm_smmu_device *smmu =3D platform_get_drvdata(pdev); =20 - if (smmu->impl_ops && smmu->impl_ops->device_disable) - smmu->impl_ops->device_disable(smmu); arm_smmu_device_disable(smmu); } =20 --=20 2.30.2