diff options
| author | Altan Hacigumus <ahacigu.linux@gmail.com> | 2026-02-04 06:35:53 +0300 |
|---|---|---|
| committer | Andrew Morton <akpm@linux-foundation.org> | 2026-03-25 00:38:26 +0300 |
| commit | 260d70819c37cf59383286f8dc6566eaa32776bb (patch) | |
| tree | 7a6e276552080e0dcc7976e554049506ae370628 /include/linux/raid | |
| parent | b8a4b088381875ff1a93c0c2d5a926b30b1bfe31 (diff) | |
| download | linux-260d70819c37cf59383286f8dc6566eaa32776bb.tar.xz | |
mm/shrinker: fix refcount leak in shrink_slab_memcg()
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.
Link: https://lkml.kernel.org/r/20260204033553.50039-1-ahacigu.linux@gmail.com
Fixes: 50d09da8e119 ("mm: shrinker: make memcg slab shrink lockless")
Signed-off-by: Altan Hacigumus <ahacigu.linux@gmail.com>
Acked-by: Qi Zheng <zhengqi.arch@bytedance.com>
Link: https://lore.kernel.org/r/20260203073757.135088-1-ahacigu.linux@gmail.com
Reviewed-by: Muchun Song <muchun.song@linux.dev>
Cc: Dave Chinner <david@fromorbit.com>
Cc: Roman Gushchin <roman.gushchin@linux.dev>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Diffstat (limited to 'include/linux/raid')
0 files changed, 0 insertions, 0 deletions
