tmp_suning_uos_patched/drivers/iommu
Yunfei Wang 0680674536 iommu/io-pgtable-arm-v7s: Add error handle for page table allocation failure
commit a556cfe4cabc6d79cbb7733f118bbb420b376fe6 upstream.

In __arm_v7s_alloc_table function:
iommu call kmem_cache_alloc to allocate page table, this function
allocate memory may fail, when kmem_cache_alloc fails to allocate
table, call virt_to_phys will be abnomal and return unexpected phys
and goto out_free, then call kmem_cache_free to release table will
trigger KE, __get_free_pages and free_pages have similar problem,
so add error handle for page table allocation failure.

Fixes: 29859aeb8a ("iommu/io-pgtable-arm-v7s: Abort allocation when table address overflows the PTE")
Signed-off-by: Yunfei Wang <yf.wang@mediatek.com>
Cc: <stable@vger.kernel.org> # 5.10.*
Acked-by: Robin Murphy <robin.murphy@arm.com>
Link: https://lore.kernel.org/r/20211207113315.29109-1-yf.wang@mediatek.com
Signed-off-by: Will Deacon <will@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2022-01-27 10:53:43 +01:00
..
amd iommu/amd: Clarify AMD IOMMUv2 initialization messages 2021-12-01 09:19:09 +01:00
arm iommu/arm-smmu: Fix arm_smmu_device refcount leak in address translation 2021-07-20 16:05:43 +02:00
intel iommu/vt-d: Update the virtual command related registers 2021-09-18 13:40:14 +02:00
dma-iommu.c iommu/dma: Fix compile warning in 32-bit builds 2021-07-14 16:56:55 +02:00
exynos-iommu.c
fsl_pamu_domain.c
fsl_pamu_domain.h
fsl_pamu.c
fsl_pamu.h
hyperv-iommu.c
io-pgtable-arm-v7s.c iommu/io-pgtable-arm-v7s: Add error handle for page table allocation failure 2022-01-27 10:53:43 +01:00
io-pgtable-arm.c
io-pgtable-arm.h
io-pgtable.c
ioasid.c
iommu-debugfs.c
iommu-sysfs.c
iommu-traces.c
iommu.c iommu: Check if group is NULL before remove device 2021-08-26 08:35:41 -04:00
iova.c
ipmmu-vmsa.c
irq_remapping.c
irq_remapping.h
Kconfig
Makefile
msm_iommu_hw-8xxx.h
msm_iommu.c
msm_iommu.h
mtk_iommu_v1.c
mtk_iommu.c
mtk_iommu.h
of_iommu.c
omap-iommu-debug.c
omap-iommu.c
omap-iommu.h
omap-iopgtable.h
rockchip-iommu.c
s390-iommu.c
sun50i-iommu.c
tegra-gart.c
tegra-smmu.c
virtio-iommu.c