summaryrefslogtreecommitdiff
path: root/drivers/iommu
diff options
context:
space:
mode:
authorJohan Hovold <johan@kernel.org>2025-10-20 06:53:05 +0200
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2026-01-08 10:14:39 +0100
commitc2e050e7872c8619399305ce0ec0c63d0dfc5c0f (patch)
tree242a04fb4d06f44156cf4377c47f4dcaec284310 /drivers/iommu
parent1970ddf9f70dc99b5d908157b4aed86d57d3c1ce (diff)
iommu/apple-dart: fix device leak on of_xlate()
commit a6eaa872c52a181ae9a290fd4e40c9df91166d7a upstream. Make sure to drop the reference taken to the iommu platform device when looking up its driver data during of_xlate(). Fixes: 46d1fb072e76 ("iommu/dart: Add DART iommu driver") Cc: stable@vger.kernel.org # 5.15 Cc: Sven Peter <sven@kernel.org> 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/iommu')
-rw-r--r--drivers/iommu/apple-dart.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/iommu/apple-dart.c b/drivers/iommu/apple-dart.c
index e8d7bcbee1a2..05fad2c50c5a 100644
--- a/drivers/iommu/apple-dart.c
+++ b/drivers/iommu/apple-dart.c
@@ -790,6 +790,8 @@ static int apple_dart_of_xlate(struct device *dev,
struct apple_dart *cfg_dart;
int i, sid;
+ put_device(&iommu_pdev->dev);
+
if (args->args_count != 1)
return -EINVAL;
sid = args->args[0];