summaryrefslogtreecommitdiff
path: root/virt
diff options
context:
space:
mode:
authorLu Baolu <baolu.lu@linux.intel.com>2022-09-11 06:18:45 +0300
committerJoerg Roedel <jroedel@suse.de>2022-09-11 09:19:24 +0300
commit9cd4f1434479f1ac25c440c421fbf52069079914 (patch)
tree9af1dd0827dafc9a02679d4cb79eedc311fa84b4 /virt
parent91c98fe7941499e4127cdc359c30841b873dd43a (diff)
downloadlinux-9cd4f1434479f1ac25c440c421fbf52069079914.tar.xz
iommu/vt-d: Fix possible recursive locking in intel_iommu_init()
The global rwsem dmar_global_lock was introduced by commit 3a5670e8ac932 ("iommu/vt-d: Introduce a rwsem to protect global data structures"). It is used to protect DMAR related global data from DMAR hotplug operations. The dmar_global_lock used in the intel_iommu_init() might cause recursive locking issue, for example, intel_iommu_get_resv_regions() is taking the dmar_global_lock from within a section where intel_iommu_init() already holds it via probe_acpi_namespace_devices(). Using dmar_global_lock in intel_iommu_init() could be relaxed since it is unlikely that any IO board must be hot added before the IOMMU subsystem is initialized. This eliminates the possible recursive locking issue by moving down DMAR hotplug support after the IOMMU is initialized and removing the uses of dmar_global_lock in intel_iommu_init(). Fixes: d5692d4af08cd ("iommu/vt-d: Fix suspicious RCU usage in probe_acpi_namespace_devices()") Reported-by: Robin Murphy <robin.murphy@arm.com> Signed-off-by: Lu Baolu <baolu.lu@linux.intel.com> Reviewed-by: Kevin Tian <kevin.tian@intel.com> Link: https://lore.kernel.org/r/894db0ccae854b35c73814485569b634237b5538.1657034828.git.robin.murphy@arm.com Link: https://lore.kernel.org/r/20220718235325.3952426-1-baolu.lu@linux.intel.com Signed-off-by: Joerg Roedel <jroedel@suse.de>
Diffstat (limited to 'virt')
0 files changed, 0 insertions, 0 deletions