summaryrefslogtreecommitdiff
path: root/drivers
diff options
context:
space:
mode:
authorJohan Hovold <johan@kernel.org>2025-10-20 07:53:08 +0300
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2026-01-11 17:19:06 +0300
commited1c3829751c6200ecee9edc27f5ade52cc8dd25 (patch)
tree50a2881b4b1336da201e1ddb9c14b04ebd198639 /drivers
parent5a86905c225358c789b1aa7acb00dcc3c49e83f0 (diff)
downloadlinux-ed1c3829751c6200ecee9edc27f5ade52cc8dd25.tar.xz
iommu/ipmmu-vmsa: fix device leak on of_xlate()
commit 80aa518452c4aceb9459f9a8e3184db657d1b441 upstream. Make sure to drop the reference taken to the iommu platform device when looking up its driver data during of_xlate(). Fixes: 7b2d59611fef ("iommu/ipmmu-vmsa: Replace local utlb code with fwspec ids") Cc: stable@vger.kernel.org # 4.14 Cc: Magnus Damm <damm+renesas@opensource.se> 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>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/iommu/ipmmu-vmsa.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/iommu/ipmmu-vmsa.c b/drivers/iommu/ipmmu-vmsa.c
index 3b30c0752274..4058e14c074e 100644
--- a/drivers/iommu/ipmmu-vmsa.c
+++ b/drivers/iommu/ipmmu-vmsa.c
@@ -714,6 +714,8 @@ static int ipmmu_init_platform_device(struct device *dev,
dev_iommu_priv_set(dev, platform_get_drvdata(ipmmu_pdev));
+ put_device(&ipmmu_pdev->dev);
+
return 0;
}