Re: [PATCH RESEND v3 00/10] mm: add and use vma_assert_stabilised() helper

Lorenzo Stoakes
2026-01-22T16:02:00Z

On Thu, Jan 22, 2026 at 03:57:35PM +0000, Lorenzo Stoakes wrote:
> On Thu, Jan 22, 2026 at 07:48:07AM -0800, Andrew Morton wrote:
> > On Thu, 22 Jan 2026 13:01:52 +0000 Lorenzo Stoakes <lorenzo.stoakes@oracle.com> wrote:
> >
> > > Sometimes we wish to assert that a VMA is stable, that is - the VMA cannot
> > > be changed underneath us. This will be the case if EITHER the VMA lock or
> > > the mmap lock is held.
> > >
> > > We already open-code this in two places - anon_vma_name() in mm/madvise.c
> > > and vma_flag_set_atomic() in include/linux/mm.h.
> > >
> > > This series adds vma_assert_stablised() which abstract this can be used in
> > > these callsites instead.
> >
> > Thanks, I added this to mm,git's mm-new branch.
> >
> > It conflicts somewhat with your series "mm: add bitmap VMA flag helpers
> > and convert all mmap_prepare to use them". I believe that a new
> > version of that series is in the works so I removed it instead of
> > attempting to fix things up. Please lmk if I should attempt to perform
> > the repairs.
> >
>
> Thanks, I'm about to send that.
>
> The conflicts hopefully shouldn't be too bad, let me know if you need any
> help with conflict resolution!
>
> Cheers, Lorenzo

Actually let me rebase that series on this one to save you the trouble! :)

Cheers, Lorenzo