OpenCloudOS-Kernel/drivers/iommu/arm/arm-smmu-v3
Jean-Philippe Brucker cbd23144f7 iommu/arm-smmu-v3-sva: Fix mm use-after-free
We currently call arm64_mm_context_put() without holding a reference to
the mm, which can result in use-after-free. Call mmgrab()/mmdrop() to
ensure the mm only gets freed after we unpinned the ASID.

Fixes: 32784a9562 ("iommu/arm-smmu-v3: Implement iommu_sva_bind/unbind()")
Signed-off-by: Jean-Philippe Brucker <jean-philippe@linaro.org>
Tested-by: Zhangfei Gao <zhangfei.gao@linaro.org>
Link: https://lore.kernel.org/r/20220426130444.300556-1-jean-philippe@linaro.org
Signed-off-by: Will Deacon <will@kernel.org>
2022-05-06 16:25:39 +01:00
..
Makefile iommu/arm-smmu-v3: Share process page tables 2020-09-28 23:48:06 +01:00
arm-smmu-v3-sva.c iommu/arm-smmu-v3-sva: Fix mm use-after-free 2022-05-06 16:25:39 +01:00
arm-smmu-v3.c iommu/arm-smmu-v3: check return value after calling platform_get_resource() 2022-05-06 16:24:57 +01:00
arm-smmu-v3.h Revert "iommu/arm-smmu-v3: Decrease the queue size of evtq and priq" 2021-12-15 10:14:06 +00:00