linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
From: Suren Baghdasaryan <surenb@google.com>
To: Muchun Song <muchun.song@linux.dev>
Cc: Altan Hacigumus <ahacigu.linux@gmail.com>,
	akpm@linux-foundation.org, david@fromorbit.com,
	 zhengqi.arch@bytedance.com, roman.gushchin@linux.dev,
	linux-mm@kvack.org,  linux-kernel@vger.kernel.org
Subject: Re: [PATCH v2] mm/shrinker: Fix refcount leak in shrink_slab_memcg()
Date: Wed, 15 Apr 2026 14:27:26 -0700	[thread overview]
Message-ID: <CAJuCfpHRgc-xBm=wYyh+AgD7FhJ93y94dw9JDzgBS1v_=bqCZw@mail.gmail.com> (raw)
In-Reply-To: <4FEDFC64-4EE4-4FC5-98DB-FAF9182FDFAB@linux.dev>

On Tue, Feb 3, 2026 at 8:00 PM Muchun Song <muchun.song@linux.dev> wrote:
>
>
>
> > On Feb 4, 2026, at 11:35, Altan Hacigumus <ahacigu.linux@gmail.com> wrote:
> >
> > When kmem is disabled for memcg, slab-backed shrinkers are skipped.
> > However, shrink_slab_memcg() doesn't drop the reference acquired via
> > shrinker_try_get() before continuing.
> >
> > Add the missing shrinker_put().
> >
> > Also, since memcg_kmem_online() and shrinker flags cannot change
> > dynamically, remove the shrinker from the bitmap to avoid unnecessary
> > future scans.
> >
> > Fixes: 50d09da8e119 ("mm: shrinker: make memcg slab shrink lockless")

Sorry for noticing this late but 50d09da8e119 was introduced back in
6.6. Is there a reason this change is not CC'ed to
stable@vger.kernel.org ?

> > Suggested-by: Qi Zheng <zhengqi.arch@bytedance.com>
> > Acked-by: Qi Zheng <zhengqi.arch@bytedance.com>
> > Link: https://lore.kernel.org/r/20260203073757.135088-1-ahacigu.linux@gmail.com
> > Signed-off-by: Altan Hacigumus <ahacigu.linux@gmail.com>
>
> Reviewed-by: Muchun Song <muchun.song@linux.dev>
>
>
>


      reply	other threads:[~2026-04-15 21:27 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-02-03  7:37 [PATCH] " Altan Hacigumus
2026-02-03  8:17 ` Qi Zheng
2026-02-03  8:43   ` Altan Hacigumus
2026-02-03  9:10   ` Altan Hacigumus
2026-02-04  3:35 ` [PATCH v2] " Altan Hacigumus
2026-02-04  3:55   ` Qi Zheng
2026-02-04  4:00   ` Muchun Song
2026-04-15 21:27     ` Suren Baghdasaryan [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='CAJuCfpHRgc-xBm=wYyh+AgD7FhJ93y94dw9JDzgBS1v_=bqCZw@mail.gmail.com' \
    --to=surenb@google.com \
    --cc=ahacigu.linux@gmail.com \
    --cc=akpm@linux-foundation.org \
    --cc=david@fromorbit.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=muchun.song@linux.dev \
    --cc=roman.gushchin@linux.dev \
    --cc=zhengqi.arch@bytedance.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