linux-stable/drivers/iommu
Lu Baolu c2f1708e14 iommu/vt-d: Fix NULL pointer reference in intel_svm_bind_mm()
[ Upstream commit c56cba5daf ]

Intel IOMMU could be turned off with intel_iommu=off. If Intel
IOMMU is off,  the intel_iommu struct will not be initialized.
When device drivers call intel_svm_bind_mm(), the NULL pointer
reference will happen there.

Add dmar_disabled check to avoid NULL pointer reference.

Cc: Ashok Raj <ashok.raj@intel.com>
Cc: Jacob Pan <jacob.jun.pan@linux.intel.com>
Reported-by: Dave Jiang <dave.jiang@intel.com>
Fixes: 2f26e0a9c9 ("iommu/vt-d: Add basic SVM PASID support")
Signed-off-by: Lu Baolu <baolu.lu@linux.intel.com>
Signed-off-by: Joerg Roedel <jroedel@suse.de>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2020-01-27 14:50:29 +01:00
..
amd_iommu.c iommu/amd: Fix line-break in error log reporting 2019-12-13 08:52:00 +01:00
amd_iommu.h iommu/amd: Override wrong IVRS IOAPIC on Raven Ridge systems 2019-10-05 13:09:59 +02:00
amd_iommu_debugfs.c
amd_iommu_init.c iommu/amd: Override wrong IVRS IOAPIC on Raven Ridge systems 2019-10-05 13:09:59 +02:00
amd_iommu_proto.h
amd_iommu_quirks.c iommu/amd: Apply the same IVRS IOAPIC workaround to Acer Aspire A315-41 2019-11-12 19:21:14 +01:00
amd_iommu_types.h iommu/amd: Reserve exclusion range in iova-domain 2019-05-04 09:20:22 +02:00
amd_iommu_v2.c
arm-smmu-regs.h
arm-smmu-v3.c iommu/arm-smmu-v3: Fix unexpected CMD_SYNC timeout 2019-11-24 08:19:30 +01:00
arm-smmu.c iommu/arm-smmu: Avoid constant zero in TLBI writes 2019-06-19 08:18:00 +02:00
dma-iommu.c iommu/dma: Handle SG length overflow better 2019-09-06 10:21:57 +02:00
dmar.c
exynos-iommu.c
fsl_pamu.c
fsl_pamu.h
fsl_pamu_domain.c
fsl_pamu_domain.h
intel-iommu.c iommu/vt-d: Don't queue_iova() if there is no flush queue 2019-08-04 09:30:54 +02:00
intel-pasid.c
intel-pasid.h
intel-svm.c iommu/vt-d: Fix NULL pointer reference in intel_svm_bind_mm() 2020-01-27 14:50:29 +01:00
intel_irq_remapping.c
io-pgtable-arm-v7s.c
io-pgtable-arm.c iommu/io-pgtable-arm: Fix race handling in split_blk_unmap() 2019-11-24 08:19:30 +01:00
io-pgtable.c
io-pgtable.h
iommu-debugfs.c iommu: Fix IOMMU debugfs fallout 2020-01-27 14:50:28 +01:00
iommu-sysfs.c
iommu-traces.c
iommu.c iommu: Remove device link to group on failure 2020-01-17 19:47:00 +01:00
iova.c iommu/iova: Init the struct iova to fix the possible memleak 2020-01-12 12:17:18 +01:00
ipmmu-vmsa.c
irq_remapping.c
irq_remapping.h
Kconfig
Makefile iommu/amd: Override wrong IVRS IOAPIC on Raven Ridge systems 2019-10-05 13:09:59 +02:00
msm_iommu.c
msm_iommu.h
msm_iommu_hw-8xxx.h
mtk_iommu.c iommu/mediatek: Correct the flush_iotlb_all callback 2020-01-17 19:47:11 +01:00
mtk_iommu.h
mtk_iommu_v1.c
of_iommu.c
omap-iommu-debug.c
omap-iommu.c
omap-iommu.h
omap-iopgtable.h
qcom_iommu.c
rockchip-iommu.c iommu: rockchip: Free domain on .domain_free 2020-01-04 19:12:37 +01:00
s390-iommu.c
tegra-gart.c
tegra-smmu.c iommu/tegra-smmu: Fix page tables in > 4 GiB memory 2020-01-04 19:12:38 +01:00