Re: [PATCH bpf-next 1/2] selftests/bpf: Return the lock error from buddy_init() of libarena

From: bot+bpf-ci

Date: Thu Oct 08 2026 - 22:37:48 EST


> selftests/bpf: Return the lock error from buddy_init() of libarena

TL;DR: Commit message only: the Fixes: tag may point at the wrong commit
(b1487dc1b181, which doesn't touch buddy_init()); 86426a28c52d introduced the
code being changed.

> selftests/bpf: Return the lock error from buddy_init() of libarena
>
> buddy_init() takes the buddy lock, an arena spin lock, to put its first
> chunk on the list, and returns -EINVAL when it can't.
> arena_spin_lock() fails with -EOPNOTSUPP on kernels built with more
> than 1024 possible CPUs, where it has no queue node for every CPU, and
> with -ETIMEDOUT or -EBUSY otherwise. Returning -EINVAL for all of them
> hides which one happened from the caller.
> Return the error of the lock.
> Fixes: b1487dc1b181 ("selftests/bpf: Add selftests for libarena buddy allocator")
> Signed-off-by: Qiliang Yuan <odys.yuan@xxxxxxxxx>

Is the Fixes: tag pointing at the right commit?

b1487dc1b181 ("selftests/bpf: Add selftests for libarena buddy allocator")
only adds st_buddy.bpf.c, st_asan_buddy.bpf.c, prog_tests/libarena.c and
prog_tests/libarena_asan.c. It does not touch src/buddy.bpf.c or
buddy_init().

The code being changed here:

if (buddy_lock(buddy, flags)) {
bpf_arena_free_pages(&arena, chunk, BUDDY_CHUNK_PAGES);
return -EINVAL;
}

was introduced by 86426a28c52d ("selftests/bpf: Add buddy allocator for
libarena"), which added buddy.bpf.c with buddy_init() already returning
-EINVAL when buddy_lock() failed. The selftests commit only exposes the
discarded error, it did not introduce the code that discards it.

The same tag is also used by the follow-up commit 27aeee1ef85a
("selftests/bpf: Skip libarena on kernels with too many possible CPUs"),
which depends on this patch to see -EOPNOTSUPP from arena_buddy_reset().

Should this be:

Fixes: 86426a28c52d ("selftests/bpf: Add buddy allocator for libarena")


---
AI reviewed your patch. Please fix the bug or email reply why it's not a bug.
See: https://github.com/kernel-patches/vmtest/blob/master/ci/claude/README.md

CI run summary: https://github.com/kernel-patches/bpf/actions/runs/37873620927