Re: [syzbot] [cgroups?] [mm?] WARNING in memcg1_swapout
From: Johannes Weiner
Date: Wed Jan 21 2026 - 10:34:56 EST
On Sun, Jan 18, 2026 at 12:53:11PM -0800, Andrew Morton wrote:
> On Sun, 18 Jan 2026 12:31:43 +0530 Deepanshu Kartikey <kartikey406@xxxxxxxxx> wrote:
>
> > > >
> > > > That's
> > > >
> > > > VM_WARN_ON_ONCE(oldid != 0);
> > > >
> > > > which was added by Deepanshu's "mm/swap_cgroup: fix kernel BUG in
> > > > swap_cgroup_record".
> > > >
> > > > This patch has Fixes: 1a4e58cce84e ("mm: introduce MADV_PAGEOUT"),
> > > > which is six years old. For some reason it has no cc:stable.
> > > >
> > > > Deepanshu's patch has no reviews.
> > > >
> > > > So can I please do the memcg maintainer summoning dance here? We have a
> > > > repeatable BUG happening in mainline Linux.
> > > >
> > >
> > > Hi Andrew,
> > >
> > > I checked the git blame output for commit 0f853ca2a798:
> > >
> > > Line 763: memcg1_swapout(folio, swap);
> > > Line 764: __swap_cache_del_folio(ci, folio, swap, shadow);
> > > (d7a7b2f91f36b - Kairui Song, 2026-01-13 02:33:36 +0800)
> > >
> > > Kairui's reordering patch appears to have been merged on Jan 13.
>
> Eek, there are many patches, it helps to identify them carefully.
>
> I think you're referring to
> https://git.kernel.org/pub/scm/linux/kernel/git/akpm/25-new.git/tree/patches/mm-swap-use-swap-cache-as-the-swap-in-synchronize-layer-fix.patch
This was supposed to be the replacement for Deepanshu's patch below.
> > > The syzbot report is also from Jan 13, likely from earlier in the
> > > day before the reordering patch was merged.
> > >
> > > So this report is from before the fix. The warning should not appear
> > > in linux-next builds after Jan 13.
> > >
> > > Thanks,
> > >
> > > Deepanshu
> >
> > Hi Andrew,
> >
> > I tested with the latest linux-next in sysbot. It is working fine
>
> Great, thanks. But we still don't have review for this one.
IOW, this is not necessary anymore. Kairui's (cc'd) fix which you
picked up fixed the syzbot reported problem.
> For some reason I don't have cc:stable on this - could people
> make a recommendation?
So this:
> From: Deepanshu Kartikey <kartikey406@xxxxxxxxx>
> Subject: mm/swap_cgroup: fix kernel BUG in swap_cgroup_record
can be dropped.
Please correct if I'm wrong.