Re: [PATCH v6 01/18] PCI/P2PDMA: Document pdev->p2pdma lifetime rules

From: Leon Romanovsky

Date: Sat Sep 19 2026 - 00:39:41 EST


On Fri, Sep 18, 2026 at 12:25:01PM -0600, Logan Gunthorpe wrote:
>
>
> On 2026-09-14 05:22, Leon Romanovsky wrote:
> > From: Leon Romanovsky <leonro@xxxxxxxxxx>
> >
> > pdev->p2pdma is normally accessed through provider-owned references, but
> > pci_p2pmem_find_many() and the p2pmem sysfs attributes may race with driver
> > unbind.
> >
> > Document initialization, teardown, and how the release grace period
> > protects both the P2PDMA state and its optional allocation pool.
> >
> > Cc: Alex Williamson <alex@xxxxxxxxxxx>
> > Cc: Matt Evans <matt@xxxxxxxxxx>
> > Signed-off-by: Leon Romanovsky <leonro@xxxxxxxxxx>
> Reads correct to me.
>
> Reviewed-by: Logan Gunthorpe <logang@xxxxxxxxxxxx>

Thanks, Logan. Unfortunately, I'm inclined to drop this patch. AI review
makes it nearly impossible to write the description without complaints.

If I use my own words to describe the lifetime, the tools complain about
almost every word or sentence. If I let the tools write it instead, the
result is complete junk that merely describes basics already obvious from
the code itself.

Thanks