Re: [PATCH v4 02/18] PCI/P2PDMA: Wait for RCU readers before freeing state
From: Jason Gunthorpe
Date: Mon Aug 24 2026 - 19:23:47 EST
On Fri, 21 Aug 2026 22:38:33 +0300, Leon Romanovsky <leon@xxxxxxxxxx> wrote:
> pci_p2pmem_find_many() scans all PCI devices without locking or
> protection against driver unbind, including devices with poolless
> P2PDMA state. pci_has_p2pmem() may observe pdev->p2pdma just before
> driver unbind clears it, while pci_p2pdma_release() skips the grace
> period when no pool is present. This allows devres to free the object
> while it is still in use.
>
> [...]
Reviewed-by: Jason Gunthorpe <jgg@xxxxxxxxxx>
--
Jason