OpenCloudOS-Kernel/drivers/iommu
Artem Chernyshev b62841e49a iommu: sprd: Avoid NULL deref in sprd_iommu_hw_en
[ Upstream commit 630482ee0653decf9e2482ac6181897eb6cde5b8 ]

In sprd_iommu_cleanup() before calling function sprd_iommu_hw_en()
dom->sdev is equal to NULL, which leads to null dereference.

Found by Linux Verification Center (linuxtesting.org) with SVACE.

Fixes: 9afea57384 ("iommu/sprd: Release dma buffer to avoid memory leak")
Signed-off-by: Artem Chernyshev <artem.chernyshev@red-soft.ru>
Reviewed-by: Chunyan Zhang <zhang.lyra@gmail.com>
Link: https://lore.kernel.org/r/20240716125522.3690358-1-artem.chernyshev@red-soft.ru
Signed-off-by: Will Deacon <will@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2024-08-03 08:54:41 +02:00
..
amd iommu/amd: Fix sysfs leak in iommu init 2024-06-21 14:38:30 +02:00
arm iommu/arm-smmu-v3: Free MSIs in case of ENOMEM 2024-06-27 13:49:03 +02:00
intel iommu/vt-d: Fix identity map bounds in si_domain_init() 2024-08-03 08:54:03 +02:00
iommufd iommufd: Fix iopt_access_list_id overwrite bug 2024-03-06 14:48:41 +00:00
Kconfig iommu: Fix compilation without CONFIG_IOMMU_INTEL 2024-03-26 18:19:39 -04:00
Makefile iommu: Remove ioasid infrastructure 2023-03-31 10:03:31 +02:00
apple-dart.c iommu/apple-dart: Handle DMA_FQ domains in attach_dev() 2023-09-25 11:37:19 +02:00
dma-iommu.c iommu/dma: Force swiotlb_max_mapping_size on an untrusted device 2024-04-03 15:28:51 +02:00
dma-iommu.h iommu: Optimise PCI SAC address trick 2023-07-14 16:14:17 +02:00
exynos-iommu.c Merge branches 'iommu/fixes', 'arm/allwinner', 'arm/exynos', 'arm/mediatek', 'arm/omap', 'arm/renesas', 'arm/rockchip', 'arm/smmu', 'ppc/pamu', 'unisoc', 'x86/vt-d', 'x86/amd', 'core' and 'platform-remove_new' into next 2023-04-14 13:45:50 +02:00
fsl_pamu.c iommu/fsl: fix all kernel-doc warnings in fsl_pamu.c 2023-03-22 14:50:15 +01:00
fsl_pamu.h
fsl_pamu_domain.c iommu/fsl: Use driver_managed_dma to allow VFIO to work 2023-06-01 11:47:48 +02:00
fsl_pamu_domain.h
hyperv-iommu.c x86/vector: Rename send_cleanup_vector() to vector_schedule_cleanup() 2023-08-06 14:15:09 +02:00
io-pgfault.c iommu: Rename iommu-sva-lib.{c,h} 2022-11-03 15:47:54 +01:00
io-pgtable-arm-v7s.c iommu/io-pgtable-arm-v7s: Remove map/unmap 2022-11-19 10:44:15 +01:00
io-pgtable-arm.c iommu/io-pgtable-arm: Remove map/unmap 2022-11-19 10:44:15 +01:00
io-pgtable-arm.h
io-pgtable-dart.c iommu/io-pgtable-dart: Add DART PTE support for t6000 2022-09-26 13:49:40 +02:00
io-pgtable.c Merge branches 'apple/dart', 'arm/mediatek', 'arm/omap', 'arm/smmu', 'virtio', 'x86/vt-d', 'x86/amd' and 'core' into next 2022-09-26 15:52:31 +02:00
iommu-debugfs.c
iommu-priv.h iommu: Move dev_iommu_ops() to private header 2023-08-18 12:52:15 -03:00
iommu-sva.c iommu: Move global PASID allocation from SVA to core 2023-08-09 17:44:36 +02:00
iommu-sva.h iommu: Remove ioasid infrastructure 2023-03-31 10:03:31 +02:00
iommu-sysfs.c iommu: Do not export iommu_device_link/unlink() 2023-07-14 16:14:15 +02:00
iommu-traces.c iommu: Remove detach_dev callback 2023-01-13 16:39:18 +01:00
iommu.c iommu: Undo pasid attachment only for the devices that have succeeded 2024-06-12 11:12:06 +02:00
iova.c iommu/iova: Optimize iova_magazine_alloc() 2023-05-22 17:09:51 +02:00
ipmmu-vmsa.c Merge branches 'apple/dart', 'arm/mediatek', 'arm/renesas', 'arm/rockchip', 'arm/smmu', 'unisoc', 'x86/vt-d', 'x86/amd' and 'core' into next 2023-08-21 14:18:43 +02:00
irq_remapping.c iommu: Fix compilation without CONFIG_IOMMU_INTEL 2024-03-26 18:19:39 -04:00
irq_remapping.h
msm_iommu.c iommu/msm: Convert to platform remove callback returning void 2023-03-31 10:01:57 +02:00
msm_iommu.h
msm_iommu_hw-8xxx.h
mtk_iommu.c iommu: mtk: fix module autoloading 2024-05-17 12:02:17 +02:00
mtk_iommu_v1.c iommu: mtk: fix module autoloading 2024-05-17 12:02:17 +02:00
of_iommu.c iommu: Don't reserve 0-length IOVA region 2024-01-25 15:35:54 -08:00
omap-iommu-debug.c iommu/omap: Fix buffer overflow in debugfs 2022-09-07 10:42:28 +02:00
omap-iommu.c Merge branches 'iommu/fixes', 'arm/allwinner', 'arm/exynos', 'arm/mediatek', 'arm/omap', 'arm/renesas', 'arm/rockchip', 'arm/smmu', 'ppc/pamu', 'unisoc', 'x86/vt-d', 'x86/amd', 'core' and 'platform-remove_new' into next 2023-04-14 13:45:50 +02:00
omap-iommu.h
omap-iopgtable.h
rockchip-iommu.c iommu: rockchip: Allocate tables from all available memory for IOMMU v2 2023-07-14 16:18:04 +02:00
s390-iommu.c iommufd for 6.3 2023-02-24 14:34:12 -08:00
sprd-iommu.c iommu: sprd: Avoid NULL deref in sprd_iommu_hw_en 2024-08-03 08:54:41 +02:00
sun50i-iommu.c iommu/sun50i: remove MODULE_LICENSE in non-modules 2023-04-13 13:13:52 -07:00
tegra-gart.c iommu: Add set_platform_dma_ops callbacks 2023-01-13 16:39:16 +01:00
tegra-smmu.c iommu: Explicitly include correct DT includes 2023-08-21 14:17:59 +02:00
virtio-iommu.c iommu: Explicitly include correct DT includes 2023-08-21 14:17:59 +02:00