Re: [PATCH 00/14] iommu: fix device leaks

From: Robin Murphy
Date: Thu Oct 02 2025 - 08:18:15 EST


On 2025-09-25 1:27 pm, Johan Hovold wrote:
This series fixes device leaks in the iommu drivers, which pretty
consistently failed to drop the reference taken by
of_find_device_by_node() when looking up iommu platform devices.

Included are also a couple of related cleanups.
Modulo the nitpick for OMAP,

Acked-by: Robin Murphy <robin.murphy@xxxxxxx>

We could in fact also clean up nearly all the NULL checks in these areas that are now entirely redundant since per-instance ops lookup, but that might just le;ad to more patches from the static checker brigade trying to put them back... :/

Thanks,
Robin.

Johan


Johan Hovold (14):
iommu/apple-dart: fix device leak on of_xlate()
iommu/qcom: fix device leak on of_xlate()
iommu/exynos: fix device leak on of_xlate()
iommu/ipmmu-vmsa: fix device leak on of_xlate()
iommu/mediatek: fix device leak on of_xlate()
iommu/mediatek: fix device leaks on probe()
iommu/mediatek: simplify dt parsing error handling
iommu/mediatek-v1: fix device leak on probe_device()
iommu/mediatek-v1: fix device leaks on probe()
iommu/mediatek-v1: add missing larb count sanity check
iommu/omap: fix device leaks on probe_device()
iommu/omap: simplify probe_device() error handling
iommu/sun50i: fix device leak on of_xlate()
iommu/tegra: fix device leak on probe_device()

drivers/iommu/apple-dart.c | 2 ++
drivers/iommu/arm/arm-smmu/qcom_iommu.c | 10 +++-----
drivers/iommu/exynos-iommu.c | 9 +++----
drivers/iommu/ipmmu-vmsa.c | 2 ++
drivers/iommu/mtk_iommu.c | 33 +++++++++++++++++--------
drivers/iommu/mtk_iommu_v1.c | 28 +++++++++++++++++----
drivers/iommu/omap-iommu.c | 32 +++++++++++++++---------
drivers/iommu/sun50i-iommu.c | 2 ++
drivers/iommu/tegra-smmu.c | 5 ++--
9 files changed, 81 insertions(+), 42 deletions(-)