Re: [PATCH 0/2] mm/mremap: fix two issues with MREMAP_DONTUNMAP
From: Lorenzo Stoakes (ARM)
Date: Wed Sep 30 2026 - 17:36:46 EST
On Wed, Sep 30, 2026 at 05:04:38PM +0100, Lorenzo Stoakes (ARM) wrote:
> On Wed, Sep 30, 2026 at 10:59:50AM -0500, Anirudh Srinivasan wrote:
> > On Sun, Sep 20, 2026 at 03:13:09PM +0100, Lorenzo Stoakes (ARM) wrote:
>
> > > Signed-off-by: Lorenzo Stoakes (ARM) <ljs@xxxxxxxxxx>
> > > ---
> > > Lorenzo Stoakes (ARM) (2):
> > > mm/mremap: fix locked_vm leak from MREMAP_DONTUNMAP self-merge
> > > mm/mremap: fix locked_vm leak by splitting VMA for MREMAP_DONTUNMAP
> >
> > Hello,
> >
> > Apologies for the double mail. I did not hit reply all first time.
> >
> > I am seeing some failures in the proc_maps_race kselftests after
> > this patch was added to linux-next. The failures are in
> > test_maps_tearing_from_remap and test_maps_tearing_from_resize. I have
> > attached some logs below
>
> Ack thanks for the report. I'll dig into this and get back to you!
>
> Instinctively I suspect the tests are making assumptions they shouldn't be,
> given this series has the MREMAP_DONTUNMAP case split in advance.
OK, the tests seem fairly sensitive to change, but the correct solution here
overall I think is to only split if the VMA is mlock()'d, so I'll do that and
send a respin + cc you on that which you can check!
That should fix the tests and avoids unnecessary splits also.
Thanks again for the report! :)
>
> --
> Cheers, Lorenzo
--
Cheers, Lorenzo