On Wed, Jul 29, 2026 at 01:08:40PM +0300, Leon Romanovsky wrote:
I remember this concern when I wrote the patches and wanted to remove RCU entirely. I revisited the Sashiko report, but reached the same conclusion again.
The "bug" reported by Sashiko does not exist. The two-layer split ensures that p2p is bound to the driver's lifecycle. As a result, pdev->p2pdma is assigned and cleared only once during the lifetime of pdev.
In this case, the RCU primitives are effectively NOPs, since nothing will ever update that pointer.
This sounds right to me too.
The lowest layer has no need of RCU at all, it just remains RCU because the genalloc layer wants it as part of its locking scheme.
So long as the genalloc gets the synchronize_rcu on destruction there is no bug.
Jason