]> git.baikalelectronics.ru Git - kernel.git/commit
iommu/vt-d: Avoid caching stale domain_device_info and fix memory leak
authorJiang Liu <jiang.liu@linux.intel.com>
Wed, 19 Feb 2014 06:07:22 +0000 (14:07 +0800)
committerJoerg Roedel <joro@8bytes.org>
Tue, 4 Mar 2014 16:50:59 +0000 (17:50 +0100)
commit62697e0ba89aed1d1d45072b188e8c997e7b9ada
tree73c64708261a149794863fc1fe31ef62e563c8f0
parent97584eb3848b594d2ab077d57d0127fa1cc086a7
iommu/vt-d: Avoid caching stale domain_device_info and fix memory leak

Function device_notifier() in intel-iommu.c fails to remove
device_domain_info data structures for PCI devices if they are
associated with si_domain because iommu_no_mapping() returns true
for those PCI devices. This will cause memory leak and caching of
stale information in domain->devices list.

So fix the issue by not calling iommu_no_mapping() and skipping check
of iommu_pass_through.

Signed-off-by: Jiang Liu <jiang.liu@linux.intel.com>
Signed-off-by: Joerg Roedel <joro@8bytes.org>
drivers/iommu/intel-iommu.c