]> git.baikalelectronics.ru Git - kernel.git/commit
iommu/amd: Check for busy devices earlier in attach_device()
authorJoerg Roedel <jroedel@suse.de>
Wed, 25 Sep 2019 13:22:58 +0000 (15:22 +0200)
committerJoerg Roedel <jroedel@suse.de>
Sat, 28 Sep 2019 12:43:58 +0000 (14:43 +0200)
commita4f673aca8f1ef16766cff876a44d50d2d82d730
tree4e25b8515f6b8319e6951ea5c4ea87afc050f22b
parent1acfcf99a3686d41bfb7c93b6670956bce09cc93
iommu/amd: Check for busy devices earlier in attach_device()

Check early in attach_device whether the device is already attached to a
domain. This also simplifies the code path so that __attach_device() can
be removed.

Fixes: 2631cc0e2db1 ("iommu/amd: Relax locking in dma_ops path")
Reviewed-by: Filippo Sironi <sironi@amazon.de>
Reviewed-by: Jerry Snitselaar <jsnitsel@redhat.com>
Signed-off-by: Joerg Roedel <jroedel@suse.de>
drivers/iommu/amd_iommu.c