On Fri, Apr 28, 2023 at 07:02:22PM +0200, David Hildenbrand wrote: > > No. VMA cannot get away before PTEs are unmapped and TLB is flushed. And > > TLB flushing is serialized against GUP_fast(). > > The whole CONFIG_MMU_GATHER_RCU_TABLE_FREE handling makes the situation more > complicated. Yeah, you have to think of gup_fast as RCU with a hacky pre-RCU implementation on most architectures. We could make page->mapping safe under RCU, for instance. Jason