Re: [PATCH 1/1] iommu: Extend mutex lock scope in iommu_probe_device()

From: Joerg Roedel
Date: Mon Dec 06 2021 - 06:40:16 EST


On Mon, Nov 08, 2021 at 02:13:49PM +0800, Lu Baolu wrote:
> 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@xxxxxxxxxx>
> Fixes: 211ff31b3d33b ("iommu: Fix race condition during default domain allocation")
> Signed-off-by: Lu Baolu <baolu.lu@xxxxxxxxxxxxxxx>
> ---
> drivers/iommu/iommu.c | 3 ++-
> 1 file changed, 2 insertions(+), 1 deletion(-)

Applied, thanks. The __iommu_attach_device() function is called under
group->mutex everywhere else, so it makes here too.

Regards,

Joerg