From: Alexei Starovoitov <alexei.starovoitov@gmail.com>
To: Andrew Morton <akpm@linux-foundation.org>
Cc: syzbot <syzbot+8259e1d0e3ae8ed0c490@syzkaller.appspotmail.com>,
Johannes Weiner <hannes@cmpxchg.org>,
Brendan Jackman <jackmanb@google.com>,
LKML <linux-kernel@vger.kernel.org>,
linux-mm <linux-mm@kvack.org>, Michal Hocko <mhocko@suse.com>,
Network Development <netdev@vger.kernel.org>,
Suren Baghdasaryan <surenb@google.com>,
syzkaller-bugs <syzkaller-bugs@googlegroups.com>,
Vlastimil Babka <vbabka@suse.cz>,
ziy@nvidia.com, bpf <bpf@vger.kernel.org>
Subject: Re: [syzbot] [mm?] WARNING: locking bug in __set_page_owner (2)
Date: Thu, 9 Oct 2025 18:02:17 -0700 [thread overview]
Message-ID: <CAADnVQKkLyJ0cbLet3q3X+X70FPAejcqTxP66d82WTO82c16rw@mail.gmail.com> (raw)
In-Reply-To: <20251009174108.ad6fea5b1e4bb84b8e2e223b@linux-foundation.org>
On Thu, Oct 9, 2025 at 5:41 PM Andrew Morton <akpm@linux-foundation.org> wrote:
>
> On Thu, 9 Oct 2025 17:26:21 -0700 Alexei Starovoitov <alexei.starovoitov@gmail.com> wrote:
>
> > On Thu, Oct 9, 2025 at 4:52 PM Andrew Morton <akpm@linux-foundation.org> wrote:
> > >
> > > On Thu, 09 Oct 2025 09:45:33 -0700 syzbot <syzbot+8259e1d0e3ae8ed0c490@syzkaller.appspotmail.com> wrote:
> > >
> > > > Hello,
> > > >
> > > > syzbot found the following issue on:
> > > >
> > > > HEAD commit: 2c95a756e0cf net: pse-pd: tps23881: Fix current measuremen..
> > > > git tree: net
> > > > console output: https://syzkaller.appspot.com/x/log.txt?x=16e1852f980000
> > > > kernel config: https://syzkaller.appspot.com/x/.config?x=5bcbbf19237350b5
> > > > dashboard link: https://syzkaller.appspot.com/bug?extid=8259e1d0e3ae8ed0c490
> > > > compiler: Debian clang version 20.1.8 (++20250708063551+0c9f909b7976-1~exp1~20250708183702.136), Debian LLD 20.1.8
> > > >
> > > > Unfortunately, I don't have any reproducer for this issue yet.
> > > >
> > > > Downloadable assets:
> > > > disk image: https://storage.googleapis.com/syzbot-assets/8272657e4298/disk-2c95a756.raw.xz
> > > > vmlinux: https://storage.googleapis.com/syzbot-assets/4e53ba690f28/vmlinux-2c95a756.xz
> > > > kernel image: https://storage.googleapis.com/syzbot-assets/6112d620d6fc/bzImage-2c95a756.xz
> > > >
> > > > IMPORTANT: if you fix the issue, please add the following tag to the commit:
> > > > Reported-by: syzbot+8259e1d0e3ae8ed0c490@syzkaller.appspotmail.com
> > >
> > > At 2c95a756e0cf, page_owner.c hasn't been modified in a couple of years.
> > >
> > > How can add_stack_record_to_list()'s spin_lock_irqsave() be "invalid
> > > wait context"? In NMI, yes, but the trace doesn't indicate that we're
> > > in an NMI.
> > >
> > > Confused. I'm suspecting BPF involvement. Cc'ed for help, please.
> >
> > The attached patch should fix it.
> > There are different options, but this one is the simplest.
>
> Cool, thanks.
>
> > From: Alexei Starovoitov <ast@kernel.org>
> > Subject: mm: don't spin in add_stack_record when gfp flags don't allow
> > Date: Thu, 9 Oct 2025 17:15:13 -0700
> >
> > syzbot was able to find the following path:
> > add_stack_record_to_list mm/page_owner.c:182 [inline]
> > inc_stack_record_count mm/page_owner.c:214 [inline]
> > __set_page_owner+0x2c3/0x4a0 mm/page_owner.c:333
> > set_page_owner include/linux/page_owner.h:32 [inline]
> > post_alloc_hook+0x240/0x2a0 mm/page_alloc.c:1851
> > prep_new_page mm/page_alloc.c:1859 [inline]
> > get_page_from_freelist+0x21e4/0x22c0 mm/page_alloc.c:3858
> > alloc_pages_nolock_noprof+0x94/0x120 mm/page_alloc.c:7554
> >
> > Don't spin in add_stack_record_to_list() when it is called
> > from *_nolock() context.
>
> Seems 6.18 will need this. Do you think it is needed in earlier kernel
> versions?
Maybe. I need to study the git history of that code to see
whether it's a new path or I simply missed it earlier.
next prev parent reply other threads:[~2025-10-10 1:02 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-10-09 16:45 syzbot
2025-10-09 23:52 ` Andrew Morton
2025-10-10 0:26 ` Alexei Starovoitov
2025-10-10 0:41 ` Andrew Morton
2025-10-10 1:02 ` Alexei Starovoitov [this message]
2025-10-13 8:10 ` Vlastimil Babka
2025-10-13 8:02 ` Oscar Salvador
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=CAADnVQKkLyJ0cbLet3q3X+X70FPAejcqTxP66d82WTO82c16rw@mail.gmail.com \
--to=alexei.starovoitov@gmail.com \
--cc=akpm@linux-foundation.org \
--cc=bpf@vger.kernel.org \
--cc=hannes@cmpxchg.org \
--cc=jackmanb@google.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=mhocko@suse.com \
--cc=netdev@vger.kernel.org \
--cc=surenb@google.com \
--cc=syzbot+8259e1d0e3ae8ed0c490@syzkaller.appspotmail.com \
--cc=syzkaller-bugs@googlegroups.com \
--cc=vbabka@suse.cz \
--cc=ziy@nvidia.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox