diff options
| author | Palla Raghunath <raghunathpalla.0209@gmail.com> | 2026-09-25 21:54:49 +0100 |
|---|---|---|
| committer | Andrew Morton <akpm@linux-foundation.org> | 2026-10-24 01:55:54 -0700 |
| commit | 499baaff382aaccb67fbceea92edebb8fa4ba876 (patch) | |
| tree | e9ed94602336c71c35f1accc995d29b70ac435cb /tools/perf/scripts/python/exported-sql-viewer.py | |
| parent | 2e83e2ce34ff9200b58ac92f4c94a31c9adcba52 (diff) | |
mm/vmalloc: do not warn on -ENOMEM from va_clip() in pcpu_get_vm_areas()
When pcpu_get_vm_areas() has to split a free vmap_area in the middle
(NE_FIT_TYPE), va_clip() needs an extra vmap_area object. It takes the
per-cpu ne_fit_preload_node if one is there, and otherwise falls back
to kmem_cache_alloc(GFP_NOWAIT), which may fail and return -ENOMEM.
pcpu_get_vm_areas() never preloads, and a single call can do more than
one such split: on a NUMA system it places one area per node group, so
the first split consumes the preloaded object and the next one depends
on the GFP_NOWAIT allocation.
That failure is expected and already handled: the recovery path returns
the areas clipped so far to the free tree, purges lazily freed areas and
retries. But the error is checked with WARN_ON_ONCE(), so a transient
allocation failure under memory pressure or fault injection triggers a
kernel warning, and a panic with panic_on_warn. syzbot hit this on a
two-node VM while creating a per-cpu BPF array map.
Keep the WARN_ON_ONCE() for errors other than -ENOMEM, which do indicate
a bug, and take the recovery path either way. This matches what commit
b9183788a2de ("mm/vmalloc: do not warn on -ENOMEM from va_alloc()") did
for the other va_clip() caller.
Link: https://lore.kernel.org/20260925205450.21262-1-raghunathpalla.0209@gmail.com
Fixes: 1b23ff80b399 ("mm/vmalloc: invoke classify_va_fit_type() in adjust_va_to_fit_type()")
Signed-off-by: Palla Raghunath <raghunathpalla.0209@gmail.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Reported-by: <syzbot+442828bb356b10813a47@syzkaller.appspotmail.com>
Closes: https://syzkaller.appspot.com/bug?extid=442828bb356b10813a47
Reviewed-by: Andrew Morton <akpm@linux-foundation.org>
Reviewed-by: Uladzislau Rezki (Sony) <urezki@gmail.com>
Reviewed-by: Dev Jain <dev.jain@arm.com>
Cc: Shuah Khan <shuah@kernel.org>
Cc: Brigham Campbell <me@brighamcampbell.com>
Cc: Baoquan He <baoquan.he@linux.dev>
Diffstat (limited to 'tools/perf/scripts/python/exported-sql-viewer.py')
0 files changed, 0 insertions, 0 deletions
