]> git.ipfire.org Git - thirdparty/kernel/stable.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)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 19 Jan 2026 12:09:59 +0000 (13:09 +0100)
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>
drivers/iommu/ipmmu-vmsa.c

index 96708cd2757f70b8bd2b9ef63bb095a118a4124a..f7e6e955b6bfd568f67fdaa1bc7d273833e5b691 100644 (file)
@@ -710,6 +710,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;
 }