]> 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)
commit786ee4aec7f4b83a7f33e309e57202648af23c31
tree7d33ccd62917126b896ba4e54b25c697ecc7babd
parentefbcc6d251b004d994051c42e4767576fd2712a9
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: dcb4ee808767 ("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