Re: [PATCH] iommu/vt-d: fix missing lock in intel_pasid_replace_*() functions
From: Baolu Lu
Date: Sun Feb 01 2026 - 21:32:15 EST
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@xxxxxxxxxxxxxxxxxx>
---
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