On 08/05/2026 19.25, Matthew Rosato wrote:
On 5/7/26 3:31 AM, Thomas Huth wrote:
On 06/05/2026 21.45, Matthew Rosato wrote:
On 5/6/26 1:41 PM, Thomas Huth wrote:
From: Thomas Huth <[email protected]>

The elements that get removed with QTAILQ_REMOVE are never referenced
afterwards anymore, so the corresponding memory should get freed.
...
Thanks Thomas!  Code looks good and I did some regression testing with
this patch applied:

Reviewed-by: Matthew Rosato <[email protected]>
Tested-by: Matthew Rosato <[email protected]>

Should we also consider adding:

Fixes: b354d5d804 ("s390x/pci: clean up s390 PCI groups")
Fixes: 37fa32de70 ("s390x/pci: Honor DMA limits set by vfio")

Yes, that makes sense.

Actually, looking at the commit description of b354d5d804, I think this
code has been added with a wrong assumption: The unrealize method is not
called during system reset.
...
So: I wonder if the proper thing to do is to refcount the groups during
plug and remove them from the list during unplug when refcount hits 0
(and of course, add the missing g_free here) -- with special handling
for the default group that should never go away.

Which is probably more than you signed on for with this patch ;) If
you'd like, I can instead sort this out and give you a reported-by?

Yes, sounds good!

Meanwhile you could still split out the fix to s390_pci_end_dma_count()
and send that one again by itself (w/ Fixes: 37fa32de70)

Sure, I'll send a v2 that contains only the other change.

 Thomas


Reply via email to