Re: [BUG] shmem: FALLOC_FL_PUNCH_HOLE vs fault-around race corrupts page cache / rss counters
From: Jan Kara
Date: Thu Oct 08 2026 - 05:28:54 EST
On Thu 08-10-26 15:58:56, Baolin Wang wrote:
> On 10/3/26 11:31 AM, Ayush Ranjan wrote:
> > Hi all,
> >
> > Gentle ping on this.
>
> Sorry for the late reply due to my vacation.
>
> The reproducer in my previous mail [1] triggers
> > "Bad page cache ... still mapped when deleted" on 6.18.46 within a
> > couple of minutes on a 128-CPU bare-metal box, with no fork() and no
> > gVisor involved.
> >
> > We continue to hit this in production at low frequency, so I am happy
> > to test patches or collect more data if that would help.
>
> Now I can reproduce this issue on my machine with the latest mm-unstable
> branch, and I understand the race. I have confirmed that Andrew's patch can
> fix it. You can try Andrew's patch.
Great that you can reproduce and understand what's going on. Can you
perhaps explain what I've asked in my reply to Andrew? I'm apparently
missing something but I don't know what that is :). Thanks!
Honza
--
Jan Kara <jack@xxxxxxxx>
SUSE Labs, CR