Re: [PATCH v2] iommu/arm-smmu: Fix arm_smmu_device refcount leak in address translation

2021-06-11 Thread Will Deacon
On Thu, 10 Jun 2021 10:49:20 +0800, Xiyu Yang wrote: > 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

Re: [PATCH v2] iommu/arm-smmu: Fix arm_smmu_device refcount leak in address translation

2021-06-10 Thread Rob Clark
On Wed, Jun 9, 2021 at 7:50 PM Xiyu Yang wrote: > > 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

[PATCH v2] iommu/arm-smmu: Fix arm_smmu_device refcount leak in address translation

2021-06-09 Thread Xiyu Yang via iommu
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