[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-Id: <4FEDFC64-4EE4-4FC5-98DB-FAF9182FDFAB@linux.dev>
Date: Wed, 4 Feb 2026 12:00:15 +0800
From: Muchun Song <muchun.song@...ux.dev>
To: Altan Hacigumus <ahacigu.linux@...il.com>
Cc: akpm@...ux-foundation.org,
david@...morbit.com,
zhengqi.arch@...edance.com,
roman.gushchin@...ux.dev,
linux-mm@...ck.org,
linux-kernel@...r.kernel.org
Subject: Re: [PATCH v2] mm/shrinker: Fix refcount leak in shrink_slab_memcg()
> On Feb 4, 2026, at 11:35, Altan Hacigumus <ahacigu.linux@...il.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")
> Suggested-by: Qi Zheng <zhengqi.arch@...edance.com>
> Acked-by: Qi Zheng <zhengqi.arch@...edance.com>
> Link: https://lore.kernel.org/r/20260203073757.135088-1-ahacigu.linux@gmail.com
> Signed-off-by: Altan Hacigumus <ahacigu.linux@...il.com>
Reviewed-by: Muchun Song <muchun.song@...ux.dev>
Powered by blists - more mailing lists