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

Re: [PATCH 03/10] iommu: Add generic_single_device_group()

From: Baolu Lu <baolu.lu@linux.intel.com>
Date: 2023-07-22 14:01:42
Also in: linux-iommu, linux-rockchip, linux-sunxi

On 2023/7/22 1:19, Jason Gunthorpe wrote:
On Thu, Jul 20, 2023 at 10:01:54PM +0800, Baolu Lu wrote:
quoted
Then, another small comment:

iommu->singleton_group will be freed with above put, right? Do you need
to set iommu->singleton_group to NULL? Given that iommu_device is not
freed here.
Well, I think the general API is we expect the caller to free the
iommu_device after calling unregister so this would be like all the
other places we free or put something then go on to release the
memory.

At the very least if the caller thinks it should re-use the
iommu_device then it needs to zero it.

Notice this also doesn't hold the lock while putting it, we require no
concurrent calls to probe with unregister.
Fair enough. Thanks for the explanation.

Best regards,
baolu

_______________________________________________
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