linux-stable/drivers/iommu
Jerry Snitselaar c4ad3ae4c6 iommu/vt-d: Clean up si_domain in the init_dmars() error path
[ Upstream commit 620bf9f981 ]

A splat from kmem_cache_destroy() was seen with a kernel prior to
commit ee2653bbe8 ("iommu/vt-d: Remove domain and devinfo mempool")
when there was a failure in init_dmars(), because the iommu_domain
cache still had objects. While the mempool code is now gone, there
still is a leak of the si_domain memory if init_dmars() fails. So
clean up si_domain in the init_dmars() error path.

Cc: Lu Baolu <baolu.lu@linux.intel.com>
Cc: Joerg Roedel <joro@8bytes.org>
Cc: Will Deacon <will@kernel.org>
Cc: Robin Murphy <robin.murphy@arm.com>
Fixes: 86080ccc22 ("iommu/vt-d: Allocate si_domain in init_dmars()")
Signed-off-by: Jerry Snitselaar <jsnitsel@redhat.com>
Link: https://lore.kernel.org/r/20221010144842.308890-1-jsnitsel@redhat.com
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>
2022-10-29 10:08:35 +02:00
..
amd iommu: Fix false ownership failure on AMD systems with PASID activated 2022-09-11 08:30:41 +02:00
arm iommu/arm-smmu-v3: Make default domain type of HiSilicon PTT device to identity 2022-10-21 12:39:22 +02:00
intel iommu/vt-d: Clean up si_domain in the init_dmars() error path 2022-10-29 10:08:35 +02:00
apple-dart.c iommu: remove the put_resv_regions method 2022-07-15 10:13:45 +02:00
dma-iommu.c Revert "iommu/dma: Add config for PCI SAC address trick" 2022-08-06 13:24:56 -07:00
exynos-iommu.c Merge branches 'arm/exynos', 'arm/mediatek', 'arm/msm', 'arm/smmu', 'virtio', 'x86/vt-d', 'x86/amd' and 'core' into next 2022-07-29 12:06:56 +02:00
fsl_pamu.c iommu/fsl_pamu: Prepare cleanup of powerpc's asm/prom.h 2022-04-28 10:20:11 +02:00
fsl_pamu.h iommu/fsl_pamu: hardcode the window address and size in pamu_config_ppaace 2021-04-07 10:56:52 +02:00
fsl_pamu_domain.c iommu: Make .release_device optional 2022-07-06 12:55:53 +02:00
fsl_pamu_domain.h iommu/fsl_pamu: remove the snoop_id field 2021-04-07 10:56:52 +02:00
hyperv-iommu.c iommu/hyper-v: Use helper instead of directly accessing affinity 2022-08-04 10:02:09 +01:00
io-pgfault.c iommu: Add a page fault handler 2021-04-07 10:54:29 +02:00
io-pgtable-arm-v7s.c iommu/io-pgtable-arm-v7s: Add a quirk to allow pgtable PA up to 35bit 2022-07-07 09:42:59 +02:00
io-pgtable-arm.c iommu/io-pgtable-arm: Fix table descriptor paddr formatting 2021-12-06 13:03:01 +01:00
io-pgtable-arm.h
io-pgtable.c iommu/io-pgtable: Add DART pagetable format 2021-08-12 13:15:02 +02:00
ioasid.c iommu/sva: Assign a PASID to mm on PASID allocation and free it on mm exit 2022-02-15 11:31:35 +01:00
iommu-debugfs.c
iommu-sva-lib.c iommu/sva: Assign a PASID to mm on PASID allocation and free it on mm exit 2022-02-15 11:31:35 +01:00
iommu-sva-lib.h iommu/sva: Assign a PASID to mm on PASID allocation and free it on mm exit 2022-02-15 11:31:35 +01:00
iommu-sysfs.c
iommu-traces.c
iommu.c iommu: Fix false ownership failure on AMD systems with PASID activated 2022-09-11 08:30:41 +02:00
iova.c dma-mapping updates 2022-08-06 10:56:45 -07:00
ipmmu-vmsa.c iommu/ipmmu-vmsa: Fix compatible for rcar-gen4 2022-06-22 15:45:56 +02:00
irq_remapping.c
irq_remapping.h
Kconfig Revert "iommu/dma: Add config for PCI SAC address trick" 2022-08-06 13:24:56 -07:00
Makefile iommu/sva: Rename CONFIG_IOMMU_SVA_LIB to CONFIG_IOMMU_SVA 2022-02-14 19:17:46 +01:00
msm_iommu.c Merge branches 'arm/exynos', 'arm/mediatek', 'arm/msm', 'arm/smmu', 'virtio', 'x86/vt-d', 'x86/amd' and 'core' into next 2022-07-29 12:06:56 +02:00
msm_iommu.h
msm_iommu_hw-8xxx.h
mtk_iommu.c Merge branches 'arm/exynos', 'arm/mediatek', 'arm/msm', 'arm/smmu', 'virtio', 'x86/vt-d', 'x86/amd' and 'core' into next 2022-07-29 12:06:56 +02:00
mtk_iommu_v1.c iommu: Clean up release_device checks 2022-07-06 12:55:53 +02:00
of_iommu.c Revert "iommu/of: Delete usage of driver_deferred_probe_check_state()" 2022-08-23 13:14:02 +02:00
omap-iommu-debug.c iommu/omap: Fix buffer overflow in debugfs 2022-10-21 12:38:59 +02:00
omap-iommu.c iommu/omap: Fix regression in probe for NULL pointer dereference 2022-04-08 11:16:29 +02:00
omap-iommu.h
omap-iopgtable.h
rockchip-iommu.c Merge branches 'arm/mediatek', 'arm/msm', 'arm/renesas', 'arm/rockchip', 'arm/smmu', 'x86/vt-d' and 'x86/amd' into next 2022-03-08 12:21:31 +01:00
s390-iommu.c iommu/s390: Tolerate repeat attach_dev calls 2022-05-20 09:57:09 +02:00
sprd-iommu.c iommu: Clean up release_device checks 2022-07-06 12:55:53 +02:00
sun50i-iommu.c iommu: Make .release_device optional 2022-07-06 12:55:53 +02:00
tegra-gart.c iommu: Make .release_device optional 2022-07-06 12:55:53 +02:00
tegra-smmu.c iommu: Make .release_device optional 2022-07-06 12:55:53 +02:00
virtio-iommu.c iommu/virtio: Fix interaction with VFIO 2022-09-07 15:44:58 +02:00