[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20250925122756.10910-5-johan@kernel.org>
Date: Thu, 25 Sep 2025 14:27:46 +0200
From: Johan Hovold <johan@...nel.org>
To: Joerg Roedel <joro@...tes.org>,
Will Deacon <will@...nel.org>
Cc: Robin Murphy <robin.murphy@....com>,
Sven Peter <sven@...nel.org>,
Janne Grunau <j@...nau.net>,
Rob Clark <robin.clark@....qualcomm.com>,
Marek Szyprowski <m.szyprowski@...sung.com>,
Yong Wu <yong.wu@...iatek.com>,
Matthias Brugger <matthias.bgg@...il.com>,
AngeloGioacchino Del Regno <angelogioacchino.delregno@...labora.com>,
Chen-Yu Tsai <wens@...e.org>,
Thierry Reding <thierry.reding@...il.com>,
Krishna Reddy <vdumpa@...dia.com>,
iommu@...ts.linux.dev,
linux-kernel@...r.kernel.org,
Johan Hovold <johan@...nel.org>,
stable@...r.kernel.org,
Magnus Damm <damm+renesas@...nsource.se>
Subject: [PATCH 04/14] iommu/ipmmu-vmsa: fix device leak on of_xlate()
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@...r.kernel.org # 4.14
Cc: Magnus Damm <damm+renesas@...nsource.se>
Signed-off-by: Johan Hovold <johan@...nel.org>
---
drivers/iommu/ipmmu-vmsa.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/drivers/iommu/ipmmu-vmsa.c b/drivers/iommu/ipmmu-vmsa.c
index ffa892f65714..02a2a55ffa0a 100644
--- a/drivers/iommu/ipmmu-vmsa.c
+++ b/drivers/iommu/ipmmu-vmsa.c
@@ -720,6 +720,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;
}
--
2.49.1
Powered by blists - more mailing lists