From: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
To: Hugh Dickins <hughd@google.com>
Cc: Shakeel Butt <shakeel.butt@linux.dev>,
syzbot <syzbot+cd2073ee6d958a8d0fcd@syzkaller.appspotmail.com>,
linux-kernel@vger.kernel.org, linux-mm@kvack.org,
syzkaller-bugs@googlegroups.com
Subject: Re: [syzbot] [mm?] WARNING in __mod_zone_page_state
Date: Mon, 31 Aug 2026 12:04:14 +0200 [thread overview]
Message-ID: <20260831100414.Yx-lNATi@linutronix.de> (raw)
In-Reply-To: <a2288e73-5001-2104-1e7a-2b383e7edd61@google.com>
On 2026-08-29 20:26:02 [-0700], Hugh Dickins wrote:
> > Something like below. I will run some tests before proposing a formal patch.
>
> Thanks for looking into this, Shakeel, but I don't think complicating
> __munlock_folio() is at all the right fix. This is peculiar to the use
> by mlock_drain_remote(), isn't it? Which is not taking the usual local_lock
> because the CPU is going offline. I would say, just take the local_lock in
> mlock_drain_remote(), but (I haven't read the history) for all I know,
> there may be PREEMPT_RT reasons why that would be completely wrong.
PREEMPT_RT does local_lock() as a replacement for various
preempt_disable()/ local_irq_save() usage in mm aiming for the same sort
of synchronisation.
On !RT __mod_zone_page_state() is usually invoked under an IRQ lock or
within an local_irq_save() section which ensures the per-CPU counter can
be updated safely without racing against another counter update due
preemption in the critical section.
The counter update does the not share the same local_lock() so for
PREEMPT_RT reasons the preempt_disable_nested() got added to ensure
preemption is disabled on RT, avoiding the race window since there can
not be any in-IRQ updates.
If this warning triggers on !PREEMPT_RT I would say you missed disabling
interrupts somewhere. Unless __mod_zone_page_state() relies on disabled
preemption, too if there are no longer any in-IRQ updates.
> Hugh
Sebastian
prev parent reply other threads:[~2026-08-31 10:04 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-08-29 17:52 syzbot
2026-08-29 23:03 ` Shakeel Butt
2026-08-30 1:08 ` Shakeel Butt
2026-08-30 3:26 ` Hugh Dickins
2026-08-30 5:15 ` Shakeel Butt
2026-08-30 17:29 ` Hugh Dickins
2026-08-31 10:28 ` Sebastian Andrzej Siewior
2026-08-31 20:11 ` Shakeel Butt
2026-08-31 10:04 ` Sebastian Andrzej Siewior [this message]
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=20260831100414.Yx-lNATi@linutronix.de \
--to=bigeasy@linutronix.de \
--cc=hughd@google.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=shakeel.butt@linux.dev \
--cc=syzbot+cd2073ee6d958a8d0fcd@syzkaller.appspotmail.com \
--cc=syzkaller-bugs@googlegroups.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
all inboxes | Powered by JetHome®