]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
s390/bpf: Do not increment tailcall count when prog is NULL
authorIlya Leoshkevich <iii@linux.ibm.com>
Tue, 17 Feb 2026 16:10:06 +0000 (17:10 +0100)
committerAlexei Starovoitov <ast@kernel.org>
Tue, 24 Feb 2026 18:47:33 +0000 (10:47 -0800)
commite4094d56c5592dd90aa619f9480265b0689ed3d9
tree38e305b96f68ce1ea1435e53e3d546c75e389719
parent3733f4be287029dad963534da3d91ac806df233d
s390/bpf: Do not increment tailcall count when prog is NULL

Currently tail calling a non-existent prog results in tailcall count
increment. This is what the interpreter is doing, but this is clearly
wrong, so replace load-and-increment and compare-and-jump with load
and compare-and-jump, conditionally followed by increment and store.

Reported-by: Hari Bathini <hbathini@linux.ibm.com>
Signed-off-by: Ilya Leoshkevich <iii@linux.ibm.com>
Link: https://lore.kernel.org/r/20260217161058.101346-1-iii@linux.ibm.com
Signed-off-by: Alexei Starovoitov <ast@kernel.org>
arch/s390/net/bpf_jit_comp.c