Thread (26 messages) 26 messages, 3 authors, 2023-07-22

RE: [PATCH 07/10] iommu/ipmmu-vmsa: Convert to generic_single_device_group()

From: "Tian, Kevin" <kevin.tian@intel.com>
Date: 2023-07-21 07:20:58
Also in: linux-iommu, linux-rockchip, linux-sunxi

From: Jason Gunthorpe <jgg@nvidia.com>
Sent: Wednesday, July 19, 2023 3:06 AM

-static struct iommu_group *ipmmu_find_group(struct device *dev)
-{
-	struct ipmmu_vmsa_device *mmu = to_ipmmu(dev);
-	struct iommu_group *group;
-
-	if (mmu->group)
-		return iommu_group_ref_get(mmu->group);
-
-	group = iommu_group_alloc();
-	if (!IS_ERR(group))
-		mmu->group = group;
-
-	return group;
-}
Looks existing code has a leak w/o freeing the group in ipmmu_remove().

While at it could you add a patch to fix it allowing backport and then this
patch to convert to the generic helper?

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help