]> Gentwo Git Trees - linux/.git/commitdiff
iommu/ipmmu-vmsa: fix device leak on of_xlate()
authorJohan Hovold <johan@kernel.org>
Mon, 20 Oct 2025 04:53:08 +0000 (06:53 +0200)
committerJoerg Roedel <joerg.roedel@amd.com>
Mon, 17 Nov 2025 08:49:43 +0000 (09:49 +0100)
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>
drivers/iommu/ipmmu-vmsa.c

index 6667ecc331f013a9c59710c5b0c53b1b7a9038a6..ca848288dbf2aab94412092e1133da24f1b04464 100644 (file)
@@ -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;
 }