linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
From: "Vlastimil Babka (SUSE)" <vbabka@kernel.org>
To: Shakeel Butt <shakeel.butt@linux.dev>,
	Cao Ruichuang <create0818@163.com>
Cc: Johannes Weiner <hannes@cmpxchg.org>,
	Michal Hocko <mhocko@kernel.org>,
	Roman Gushchin <roman.gushchin@linux.dev>,
	Muchun Song <muchun.song@linux.dev>,
	Andrew Morton <akpm@linux-foundation.org>,
	David Hildenbrand <david@kernel.org>,
	Lorenzo Stoakes <ljs@kernel.org>,
	"Liam R. Howlett" <Liam.Howlett@oracle.com>,
	Mike Rapoport <rppt@kernel.org>,
	Suren Baghdasaryan <surenb@google.com>,
	cgroups@vger.kernel.org, linux-mm@kvack.org,
	linux-kernel@vger.kernel.org,
	syzbot+1a3353a77896e73a8f53@syzkaller.appspotmail.com
Subject: Re: [PATCH] mm/memcontrol: restore irq wrapper for lruvec_stat_mod_folio()
Date: Tue, 14 Apr 2026 09:56:36 +0200	[thread overview]
Message-ID: <ef2d8f65-b3b4-4a9c-a77f-78ad1cadff28@kernel.org> (raw)
In-Reply-To: <ad0clnEYxf1H4_S1@linux.dev>

On 4/13/26 18:44, Shakeel Butt wrote:
> On Mon, Apr 13, 2026 at 02:48:33PM +0800, Cao Ruichuang wrote:
>> Commit c1bd09994c4d ("memcg: remove __lruvec_stat_mod_folio") removed
>> the local_irq_save/restore wrapper around lruvec_stat_mod_folio(), based
>> on the assumption that the underlying stat update path was already
>> IRQ-safe.
> 
> Why is that an assumption? Please explain how lruvec_stat_mod_folio() is not
> safe against IRQs?
> 
>> 
>> That assumption is too broad for lruvec_stat_mod_folio() callers.
>> This helper is not just a thin stat primitive.  It also resolves
>> folio -> memcg -> lruvec under a helper-managed RCU read-side section.
>> 
>> syzbot now reports a PREEMPT_RT warning from:
> 
> The syzbot link you have provided has the kernel config without PREEMPT_RT?
> Where does this claim come from?
> 
>> 
>>   __filemap_add_folio()
>>     -> lruvec_stat_mod_folio()
>>        -> __rcu_read_unlock()
>> 
>> ending in bad unlock balance / negative RCU nesting.
> 
> If there is bad unlock balance, how is disabling/enabling IRQs would solve that
> issue?

This is obviously a product of LLM producing a patch from the syzbot report.
I suggest we ignore everything from this author.


      reply	other threads:[~2026-04-14  7:56 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-04-13  6:48 Cao Ruichuang
2026-04-13 16:44 ` Shakeel Butt
2026-04-14  7:56   ` Vlastimil Babka (SUSE) [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=ef2d8f65-b3b4-4a9c-a77f-78ad1cadff28@kernel.org \
    --to=vbabka@kernel.org \
    --cc=Liam.Howlett@oracle.com \
    --cc=akpm@linux-foundation.org \
    --cc=cgroups@vger.kernel.org \
    --cc=create0818@163.com \
    --cc=david@kernel.org \
    --cc=hannes@cmpxchg.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=ljs@kernel.org \
    --cc=mhocko@kernel.org \
    --cc=muchun.song@linux.dev \
    --cc=roman.gushchin@linux.dev \
    --cc=rppt@kernel.org \
    --cc=shakeel.butt@linux.dev \
    --cc=surenb@google.com \
    --cc=syzbot+1a3353a77896e73a8f53@syzkaller.appspotmail.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