bpf: verifier: permit non-zero returns from async callbacks
authorMykyta Yatsenko <yatsenko@meta.com>
Tue, 23 Sep 2025 11:23:59 +0000 (12:23 +0100)
committerAlexei Starovoitov <ast@kernel.org>
Tue, 23 Sep 2025 14:34:38 +0000 (07:34 -0700)
commitd2699bdb6ebad4fecd0f8765f35bd32a4a142b16
tree327c0cc222dbe80beea084d378bdebabc762e76a
parentacc3a0d2506c1b8186e9190adcd5bee4a1932abc
bpf: verifier: permit non-zero returns from async callbacks

The verifier currently enforces a zero return value for all async
callbacks—a constraint originally introduced for bpf_timer. That
restriction is too narrow for other async use cases.

Relax the rule by allowing non-zero return codes from async callbacks in
general, while preserving the zero-return requirement for bpf_timer to
maintain its existing semantics.

Signed-off-by: Mykyta Yatsenko <yatsenko@meta.com>
Acked-by: Eduard Zingerman <eddyz87@gmail.com>
Link: https://lore.kernel.org/r/20250923112404.668720-5-mykyta.yatsenko5@gmail.com
Signed-off-by: Alexei Starovoitov <ast@kernel.org>
kernel/bpf/verifier.c