diff options
| author | Uladzislau Rezki (Sony) <urezki@gmail.com> | 2026-04-13 21:26:46 +0200 |
|---|---|---|
| committer | Andrew Morton <akpm@linux-foundation.org> | 2026-04-18 23:24:27 -0700 |
| commit | ec05f51f1e65bce95528543eb73fda56fd201d94 (patch) | |
| tree | 54fbbfbfbcd82cf9d015e8647215016d99cfff43 /lib/raid/xor/alpha/git@git.tavy.me:linux.git | |
| parent | 615d9bb2ccad42f9e21d837431e401db2e471195 (diff) | |
mm/vmalloc: take vmap_purge_lock in shrinker
decay_va_pool_node() can be invoked concurrently from two paths:
__purge_vmap_area_lazy() when pools are being purged, and the shrinker via
vmap_node_shrink_scan().
However, decay_va_pool_node() is not safe to run concurrently, and the
shrinker path currently lacks serialization, leading to races and possible
leaks.
Protect decay_va_pool_node() by taking vmap_purge_lock in the shrinker
path to ensure serialization with purge users.
Link: https://lore.kernel.org/20260413192646.14683-1-urezki@gmail.com
Fixes: 7679ba6b36db ("mm: vmalloc: add a shrinker to drain vmap pools")
Signed-off-by: Uladzislau Rezki (Sony) <urezki@gmail.com>
Reviewed-by: Baoquan He <baoquan.he@linux.dev>
Cc: chenyichong <chenyichong@uniontech.com>
Cc: <stable@vger.kernel.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Diffstat (limited to 'lib/raid/xor/alpha/git@git.tavy.me:linux.git')
0 files changed, 0 insertions, 0 deletions
