]> git.baikalelectronics.ru Git - kernel.git/commit
iommu/vt-d: Fix possible use-after-free of private domain
authorLu Baolu <baolu.lu@linux.intel.com>
Tue, 6 Aug 2019 00:14:09 +0000 (08:14 +0800)
committerJoerg Roedel <jroedel@suse.de>
Fri, 9 Aug 2019 15:35:25 +0000 (17:35 +0200)
commit5ca333a58760fb7a86bccf759b4aa2ca02c36c05
treed2e1a012c4e47e8a5d1740ae19f12d366ebac4b4
parentcb65719d96ca540f51d2d7970c9706722903230f
iommu/vt-d: Fix possible use-after-free of private domain

Multiple devices might share a private domain. One real example
is a pci bridge and all devices behind it. When remove a private
domain, make sure that it has been detached from all devices to
avoid use-after-free case.

Cc: Ashok Raj <ashok.raj@intel.com>
Cc: Jacob Pan <jacob.jun.pan@linux.intel.com>
Cc: Kevin Tian <kevin.tian@intel.com>
Cc: Alex Williamson <alex.williamson@redhat.com>
Fixes: e343746f73c27 ("iommu/vt-d: Identify default domains replaced with private")
Signed-off-by: Lu Baolu <baolu.lu@linux.intel.com>
Tested-by: Alex Williamson <alex.williamson@redhat.com>
Signed-off-by: Joerg Roedel <jroedel@suse.de>
drivers/iommu/intel-iommu.c