[PATCH] iommu: Don't call .probe_finalize() under group->mutex

Yong Wu yong.wu at mediatek.com
Wed May 20 06:53:23 UTC 2020

On Tue, 2020-05-19 at 15:28 +0200, Joerg Roedel wrote:
> From: Joerg Roedel <jroedel at suse.de>
> The .probe_finalize() call-back of some IOMMU drivers calls into
> arm_iommu_attach_device(). This function will call back into the
> IOMMU core code, where it tries to take group->mutex again, resulting
> in a deadlock.
> As there is no reason why .probe_finalize() needs to be called under
> that mutex, move it after the lock has been released to fix the
> deadlock.
> Cc: Yong Wu <yong.wu at mediatek.com>
> Reported-by: Yong Wu <yong.wu at mediatek.com>
> Fixes: deac0b3bed26 ("iommu: Split off default domain allocation from group assignment")
> Signed-off-by: Joerg Roedel <jroedel at suse.de>

Tested-by: Yong Wu <yong.wu at mediatek.com>

Tested on MediaTek-v1 mt2701 evb board.

More information about the iommu mailing list