All of lore.kernel.org
 help / color / mirror / Atom feed
From: Shakeel Butt <shakeel.butt@linux.dev>
To: 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>,
	 Vlastimil Babka <vbabka@kernel.org>,
	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: Mon, 13 Apr 2026 09:44:08 -0700	[thread overview]
Message-ID: <ad0clnEYxf1H4_S1@linux.dev> (raw)
In-Reply-To: <20260413064833.964-1-create0818@163.com>

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?


  reply	other threads:[~2026-04-13 16:44 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-04-13  6:48 [PATCH] mm/memcontrol: restore irq wrapper for lruvec_stat_mod_folio() Cao Ruichuang
2026-04-13 16:44 ` Shakeel Butt [this message]
2026-04-14  7:56   ` Vlastimil Babka (SUSE)
2026-04-15 16:22     ` create0818

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=ad0clnEYxf1H4_S1@linux.dev \
    --to=shakeel.butt@linux.dev \
    --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=surenb@google.com \
    --cc=syzbot+1a3353a77896e73a8f53@syzkaller.appspotmail.com \
    --cc=vbabka@kernel.org \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.