]> git.baikalelectronics.ru Git - kernel.git/commit
iommu/amd: Lock code paths traversing protection_domain->dev_list
authorJoerg Roedel <jroedel@suse.de>
Wed, 25 Sep 2019 13:23:00 +0000 (15:23 +0200)
committerJoerg Roedel <jroedel@suse.de>
Sat, 28 Sep 2019 12:44:13 +0000 (14:44 +0200)
commit660225a364646cd869e958d3eb5a758d5fd0544d
tree7d33ccd62917126b896ba4e54b25c697ecc7babd
parentc15ef3fbe903981a6e0191b65603dc9341875157
iommu/amd: Lock code paths traversing protection_domain->dev_list

The traversing of this list requires protection_domain->lock to be taken
to avoid nasty races with attach/detach code. Make sure the lock is held
on all code-paths traversing this list.

Reported-by: Filippo Sironi <sironi@amazon.de>
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