]> git.baikalelectronics.ru Git - kernel.git/commit
iommu/vt-d: Call __dmar_remove_one_dev_info with valid pointer
authorJerry Snitselaar <jsnitsel@redhat.com>
Wed, 22 Jan 2020 00:34:26 +0000 (17:34 -0700)
committerJoerg Roedel <jroedel@suse.de>
Fri, 24 Jan 2020 14:23:50 +0000 (15:23 +0100)
commit3a4a1db39a9bc2569e4dd881c0df77687609fec6
tree99cf8b28a883c1d690713298386af93bc158c88f
parentf85da7ea4f5a17b2c83170feeeeddd6691503a52
iommu/vt-d: Call __dmar_remove_one_dev_info with valid pointer

It is possible for archdata.iommu to be set to
DEFER_DEVICE_DOMAIN_INFO or DUMMY_DEVICE_DOMAIN_INFO so check for
those values before calling __dmar_remove_one_dev_info. Without a
check it can result in a null pointer dereference. This has been seen
while booting a kdump kernel on an HP dl380 gen9.

Cc: Joerg Roedel <joro@8bytes.org>
Cc: Lu Baolu <baolu.lu@linux.intel.com>
Cc: David Woodhouse <dwmw2@infradead.org>
Cc: stable@vger.kernel.org # 5.3+
Cc: linux-kernel@vger.kernel.org
Fixes: cb65719d96ca ("iommu/vt-d: Detach domain before using a private one")
Signed-off-by: Jerry Snitselaar <jsnitsel@redhat.com>
Acked-by: Lu Baolu <baolu.lu@linux.intel.com>
Signed-off-by: Joerg Roedel <jroedel@suse.de>
drivers/iommu/intel-iommu.c