linux_dsm_epyc7002/drivers/iommu/arm
Xiyu Yang 43d1aaa196 iommu/arm-smmu: Fix arm_smmu_device refcount leak in address translation
[ Upstream commit 7c8f176d6a3fa18aa0f8875da6f7c672ed2a8554 ]

The reference counting issue happens in several exception handling paths
of arm_smmu_iova_to_phys_hard(). When those error scenarios occur, the
function forgets to decrease the refcount of "smmu" increased by
arm_smmu_rpm_get(), causing a refcount leak.

Fix this issue by jumping to "out" label when those error scenarios
occur.

Signed-off-by: Xiyu Yang <xiyuyang19@fudan.edu.cn>
Signed-off-by: Xin Tan <tanxin.ctf@gmail.com>
Reviewed-by: Rob Clark <robdclark@chromium.org>
Link: https://lore.kernel.org/r/1623293391-17261-1-git-send-email-xiyuyang19@fudan.edu.cn
Signed-off-by: Will Deacon <will@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2021-07-20 16:05:43 +02:00
..
arm-smmu iommu/arm-smmu: Fix arm_smmu_device refcount leak in address translation 2021-07-20 16:05:43 +02:00
arm-smmu-v3 iommu/arm-smmu-v3: add bit field SFM into GERROR_ERR_MASK 2021-05-14 09:50:31 +02:00
Makefile iommu/arm-smmu: Move Arm SMMU drivers into their own subdirectory 2020-07-27 12:53:10 +01:00