]> git.baikalelectronics.ru Git - kernel.git/commit
iommu/amd: Take domain->lock for complete attach/detach path
authorJoerg Roedel <jroedel@suse.de>
Wed, 25 Sep 2019 13:22:57 +0000 (15:22 +0200)
committerJoerg Roedel <jroedel@suse.de>
Sat, 28 Sep 2019 12:43:52 +0000 (14:43 +0200)
commit1acfcf99a3686d41bfb7c93b6670956bce09cc93
treec01bbfce2692ac4d1f7f620a26ca98c52adea28c
parent97fd20a746487d30b3444d3ad330c8bbafb5cf03
iommu/amd: Take domain->lock for complete attach/detach path

The code-paths before __attach_device() and __detach_device() are called
also access and modify domain state, so take the domain lock there too.
This allows to get rid of the __detach_device() function.

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