From: Runyu Xiao <runyu.xiao@seu.edu.cn>
To: Marek Szyprowski <m.szyprowski@samsung.com>
Cc: Joerg Roedel <joro@8bytes.org>, Will Deacon <will@kernel.org>,
Robin Murphy <robin.murphy@arm.com>,
Krzysztof Kozlowski <krzk@kernel.org>,
Alim Akhtar <alim.akhtar@samsung.com>,
KyongHo Cho <pullip.cho@samsung.com>,
Kukjin Kim <kgene.kim@samsung.com>,
iommu@lists.linux.dev, linux-arm-kernel@lists.infradead.org,
linux-samsung-soc@vger.kernel.org, linux-kernel@vger.kernel.org,
stable@vger.kernel.org, Runyu Xiao <runyu.xiao@seu.edu.cn>,
Jianhao Xu <jianhao.xu@seu.edu.cn>
Subject: [PATCH] iommu/exynos: Initialize lock before requesting IRQ
Date: Tue, 1 Sep 2026 21:05:27 +0800 [thread overview]
Message-ID: <20260901130527.3289245-1-runyu.xiao@seu.edu.cn> (raw)
The SysMMU interrupt handler can run as soon as devm_request_irq() is
called. Initialize the driver lock before registering the handler so an
early interrupt cannot use an uninitialized lock.
Fixes: 2a96536e77b4 ("iommu/exynos: Add iommu driver for EXYNOS Platforms")
Cc: stable@vger.kernel.org
Signed-off-by: Runyu Xiao <runyu.xiao@seu.edu.cn>
Assisted-by: Codex:GPT-5
---
drivers/iommu/exynos-iommu.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/drivers/iommu/exynos-iommu.c b/drivers/iommu/exynos-iommu.c
index 874d05f4b..e9feb83b3 100644
--- a/drivers/iommu/exynos-iommu.c
+++ b/drivers/iommu/exynos-iommu.c
@@ -735,6 +735,8 @@ static int exynos_sysmmu_probe(struct platform_device *pdev)
if (!data)
return -ENOMEM;
+ spin_lock_init(&data->lock);
+
res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
data->sfrbase = devm_ioremap_resource(dev, res);
if (IS_ERR(data->sfrbase))
@@ -773,7 +775,6 @@ static int exynos_sysmmu_probe(struct platform_device *pdev)
return PTR_ERR(data->clk_master);
data->sysmmu = dev;
- spin_lock_init(&data->lock);
__sysmmu_get_version(data);
--
2.34.1
next reply other threads:[~2026-09-01 13:05 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <CGME20260901130537eucas1p274a55745ced68a1e157bd43cfd17448f@eucas1p2.samsung.com>
2026-09-01 13:05 ` Runyu Xiao [this message]
2026-09-01 13:20 ` [PATCH] iommu/exynos: Initialize lock before requesting IRQ Robin Murphy
2026-09-01 14:37 ` Marek Szyprowski
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20260901130527.3289245-1-runyu.xiao@seu.edu.cn \
--to=runyu.xiao@seu.edu.cn \
--cc=alim.akhtar@samsung.com \
--cc=iommu@lists.linux.dev \
--cc=jianhao.xu@seu.edu.cn \
--cc=joro@8bytes.org \
--cc=kgene.kim@samsung.com \
--cc=krzk@kernel.org \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-samsung-soc@vger.kernel.org \
--cc=m.szyprowski@samsung.com \
--cc=pullip.cho@samsung.com \
--cc=robin.murphy@arm.com \
--cc=stable@vger.kernel.org \
--cc=will@kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox