]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
iommu/qcom: fix device leak on of_xlate()
authorJohan Hovold <johan@kernel.org>
Mon, 20 Oct 2025 04:53:06 +0000 (06:53 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 8 Jan 2026 09:16:56 +0000 (10:16 +0100)
commit6b8390fcef610432686b464079955381dcce2c78
tree7a3633f3c8f79814350fec031a3fdf270ee6f9a3
parentd496519ccd7ebd0eb038cd4ef41b70422100d0c5
iommu/qcom: fix device leak on of_xlate()

commit 6a3908ce56e6879920b44ef136252b2f0c954194 upstream.

Make sure to drop the reference taken to the iommu platform device when
looking up its driver data during of_xlate().

Note that commit e2eae09939a8 ("iommu/qcom: add missing put_device()
call in qcom_iommu_of_xlate()") fixed the leak in a couple of error
paths, but the reference is still leaking on success and late failures.

Fixes: 0ae349a0f33f ("iommu/qcom: Add qcom_iommu")
Cc: stable@vger.kernel.org # 4.14: e2eae09939a8
Cc: Rob Clark <robin.clark@oss.qualcomm.com>
Cc: Yu Kuai <yukuai3@huawei.com>
Acked-by: Robin Murphy <robin.murphy@arm.com>
Signed-off-by: Johan Hovold <johan@kernel.org>
Signed-off-by: Joerg Roedel <joerg.roedel@amd.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/iommu/arm/arm-smmu/qcom_iommu.c