[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20240627204116.GD469122@cmpxchg.org>
Date: Thu, 27 Jun 2024 16:41:16 -0400
From: Johannes Weiner <hannes@...xchg.org>
To: Nhat Pham <nphamcs@...il.com>
Cc: akpm@...ux-foundation.org, kernel-team@...a.com, linux-mm@...ck.org,
linux-kernel@...r.kernel.org, stable@...r.kernel.org,
willy@...radead.org, david@...hat.com, ryan.roberts@....com,
ying.huang@...el.com, viro@...iv.linux.org.uk, kasong@...cent.com,
yosryahmed@...gle.com, shakeel.butt@...ux.dev,
linux-fsdevel@...r.kernel.org
Subject: Re: [PATCH] cachestat: do not flush stats in recency check
On Thu, Jun 27, 2024 at 01:17:37PM -0700, Nhat Pham wrote:
> syzbot detects that cachestat() is flushing stats, which can sleep, in
> its RCU read section (see [1]). This is done in the
> workingset_test_recent() step (which checks if the folio's eviction is
> recent).
>
> Move the stat flushing step to before the RCU read section of cachestat,
> and skip stat flushing during the recency check.
>
> [1]: https://lore.kernel.org/cgroups/000000000000f71227061bdf97e0@google.com/
>
> Reported-by: syzbot+b7f13b2d0cc156edf61a@...kaller.appspotmail.com
> Closes: https://lore.kernel.org/cgroups/000000000000f71227061bdf97e0@google.com/
> Debugged-by: Johannes Weiner <hannes@...xchg.org>
> Suggested-by: Johannes Weiner <hannes@...xchg.org>
> Signed-off-by: Nhat Pham <nphamcs@...il.com>
> Fixes: b00684722262 ("mm: workingset: move the stats flush into workingset_test_recent()")
> Cc: stable@...r.kernel.org # v6.8+
Acked-by: Johannes Weiner <hannes@...xchg.org>
Powered by blists - more mailing lists