iommu: Extend mutex lock scope in iommu_probe_device()
authorLu Baolu <baolu.lu@linux.intel.com>
Mon, 8 Nov 2021 06:13:49 +0000 (14:13 +0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 27 Jan 2022 10:04:10 +0000 (11:04 +0100)
commit004d84063fa22ef983ade4edfd970474aa0f86c3
tree6a989b6ab7e569cd2289034ad349adb9eb66bd15
parent37fb3dec665c7c9295ac86d5be078fea945ed9ba
iommu: Extend mutex lock scope in iommu_probe_device()

[ Upstream commit 556f99ac886635e8da15528995f06d1d7028cfca ]

Extend the scope of holding group->mutex so that it can cover the default
domain check/attachment and direct mappings of reserved regions.

Cc: Ashish Mhetre <amhetre@nvidia.com>
Fixes: 211ff31b3d33b ("iommu: Fix race condition during default domain allocation")
Signed-off-by: Lu Baolu <baolu.lu@linux.intel.com>
Link: https://lore.kernel.org/r/20211108061349.1985579-1-baolu.lu@linux.intel.com
Signed-off-by: Joerg Roedel <jroedel@suse.de>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/iommu/iommu.c