From: Baolu Lu <baolu.lu@linux.intel.com>
To: Ziyi Guo <n7l8m4@u.northwestern.edu>,
David Woodhouse <dwmw2@infradead.org>
Cc: Joerg Roedel <joro@8bytes.org>, Will Deacon <will@kernel.org>,
Robin Murphy <robin.murphy@arm.com>,
iommu@lists.linux.dev, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] iommu/vt-d: fix missing lock in intel_pasid_replace_*() functions
Date: Mon, 2 Feb 2026 10:31:36 +0800 [thread overview]
Message-ID: <00d4c485-5f01-4b8a-8073-f269be1e86f7@linux.intel.com> (raw)
In-Reply-To: <20260130190655.1622261-1-n7l8m4@u.northwestern.edu>
On 1/31/26 03:06, Ziyi Guo wrote:
> intel_pasid_replace_first_level(), intel_pasid_replace_second_level(),
> intel_pasid_replace_pass_through(), and intel_pasid_replace_nested()
> call their respective pasid_pte_config_*() helpers before acquiring
> iommu->lock. However, each config function has
> lockdep_assert_held(&iommu->lock).
>
> The corresponding intel_pasid_setup_*() functions correctly acquire
> iommu->lock before calling the config helpers.
>
> Let spin_lock(&iommu->lock) before the pasid_pte_config_*() calls to
> fix the lockdep assertions and ensure consistent access to IOMMU state.
>
> Signed-off-by: Ziyi Guo<n7l8m4@u.northwestern.edu>
> ---
> drivers/iommu/intel/pasid.c | 12 ++++--------
> 1 file changed, 4 insertions(+), 8 deletions(-)
Thanks for the patch. It looks like this was addressed by commit
c3b1edea3791 ("iommu/vt-d: Fix race condition during PASID entry
replacement"), currently in iommu/next. Let me know if you think there
is still something missing.
Thanks,
baolu
prev parent reply other threads:[~2026-02-02 2:32 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-01-30 19:06 Ziyi Guo
2026-02-02 2:31 ` Baolu Lu [this message]
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=00d4c485-5f01-4b8a-8073-f269be1e86f7@linux.intel.com \
--to=baolu.lu@linux.intel.com \
--cc=dwmw2@infradead.org \
--cc=iommu@lists.linux.dev \
--cc=joro@8bytes.org \
--cc=linux-kernel@vger.kernel.org \
--cc=n7l8m4@u.northwestern.edu \
--cc=robin.murphy@arm.com \
--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
all inboxes | Powered by JetHome®