Skip to content
Commit cbd23144 authored by Jean-Philippe Brucker's avatar Jean-Philippe Brucker Committed by Will Deacon
Browse files

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: 32784a95 ("iommu/arm-smmu-v3: Implement iommu_sva_bind/unbind()")
Signed-off-by: default avatarJean-Philippe Brucker <jean-philippe@linaro.org>
Tested-by: default avatarZhangfei Gao <zhangfei.gao@linaro.org>
Link: https://lore.kernel.org/r/20220426130444.300556-1-jean-philippe@linaro.org


Signed-off-by: default avatarWill Deacon <will@kernel.org>
parent b131fa8c
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment