From: Robin Murphy <robin.murphy@arm.com>
To: Runyu Xiao <runyu.xiao@seu.edu.cn>,
Marek Szyprowski <m.szyprowski@samsung.com>
Cc: Joerg Roedel <joro@8bytes.org>, Will Deacon <will@kernel.org>,
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, Jianhao Xu <jianhao.xu@seu.edu.cn>
Subject: Re: [PATCH] iommu/exynos: Initialize lock before requesting IRQ
Date: Tue, 1 Sep 2026 14:20:11 +0100 [thread overview]
Message-ID: <0872f586-ce2c-41b4-9452-0b9c3052aea1@arm.com> (raw)
In-Reply-To: <20260901130527.3289245-1-runyu.xiao@seu.edu.cn>
On 01/09/2026 2:05 pm, Runyu Xiao wrote:
> 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.
And what about all the _other_ data the handler unconditionally
dereferences which is also still uninitialised at this point? If you
think this (clearly theoretical) race is worth fixing then at least
actually fix it...
Thanks,
Robin.
> 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);
>
next prev parent reply other threads:[~2026-09-01 13:20 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 ` [PATCH] iommu/exynos: Initialize lock before requesting IRQ Runyu Xiao
2026-09-01 13:20 ` Robin Murphy [this message]
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=0872f586-ce2c-41b4-9452-0b9c3052aea1@arm.com \
--to=robin.murphy@arm.com \
--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=runyu.xiao@seu.edu.cn \
--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