]> git.baikalelectronics.ru Git - kernel.git/commit
iommu/amd: Lock dev_data in attach/detach code paths
authorJoerg Roedel <jroedel@suse.de>
Wed, 25 Sep 2019 13:22:59 +0000 (15:22 +0200)
committerJoerg Roedel <jroedel@suse.de>
Sat, 28 Sep 2019 12:44:04 +0000 (14:44 +0200)
commitc15ef3fbe903981a6e0191b65603dc9341875157
treefb3c380fff0299866ebdc89fd52010d1bc4782f8
parenta4f673aca8f1ef16766cff876a44d50d2d82d730
iommu/amd: Lock dev_data in attach/detach code paths

Make sure that attaching a detaching a device can't race against each
other and protect the iommu_dev_data with a spin_lock in these code
paths.

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
drivers/iommu/amd_iommu_types.h