diff options
| author | Emil Tsalapatis <emil@etsalapatis.com> | 2026-10-02 10:52:14 +0000 |
|---|---|---|
| committer | Alexei Starovoitov <ast@kernel.org> | 2026-10-02 13:00:59 +0000 |
| commit | 5316ede1f5d07653a669285ca715a24152d729c6 (patch) | |
| tree | 98db944cac2482b019a80adb5c69b186497ff7ee /include/linux/timerqueue.h | |
| parent | cbe7d2bf7355416815c878e839d03028f4724dfb (diff) | |
| download | linux-next-5316ede1f5d07653a669285ca715a24152d729c6.tar.gz linux-next-5316ede1f5d07653a669285ca715a24152d729c6.zip | |
bpf: Add sleepable arena page allocation path
The bpf_arena_alloc_pages() function currently only allocates pages
inside a spinlock critical section with IRQs off. This forces the use of
alloc_pages_nolock() in the BPF allocator, even when the caller is a
sleepable BPF function. This in turn causes allocation failures even in
cases where falling into the allocator slow path and possibly sleeping
would eventually succeed. This can be triggered consistently by heavy
BPF arena users like scx.
Allocate the arena pages before taking the critical section and pass
whether the caller can sleep to bpf_alloc_pages(). This lets sleepable
callers use the blocking allocator while non-sleepable callers retain
the no-lock allocation behavior.
Fixes: b8467290edab ("bpf: arena: make arena kfuncs any context safe")
Signed-off-by: Emil Tsalapatis <emil@etsalapatis.com>
Signed-off-by: Alexei Starovoitov <ast@kernel.org>
Link: https://patch.msgid.link/20261002105218.6171-4-emil@etsalapatis.com
Diffstat (limited to 'include/linux/timerqueue.h')
0 files changed, 0 insertions, 0 deletions
