]> git.ipfire.org Git - thirdparty/linux.git/commit
bpf: Do not increment tailcall count when prog is NULL
authorHari Bathini <hbathini@linux.ibm.com>
Fri, 20 Feb 2026 06:29:58 +0000 (11:59 +0530)
committerAlexei Starovoitov <ast@kernel.org>
Tue, 24 Feb 2026 18:34:16 +0000 (10:34 -0800)
commit3733f4be287029dad963534da3d91ac806df233d
tree728240c0a1c72416211157d0c482aa91797590fd
parent055d8dd55302927e5b12d7ad4406730aba9f3f75
bpf: Do not increment tailcall count when prog is NULL

Currently, tailcall count is incremented in the interpreter even when
tailcall fails due to non-existent prog. Fix this by holding off on
the tailcall count increment until after NULL check on the prog.

Suggested-by: Ilya Leoshkevich <iii@linux.ibm.com>
Signed-off-by: Hari Bathini <hbathini@linux.ibm.com>
Link: https://lore.kernel.org/r/20260220062959.195101-1-hbathini@linux.ibm.com
Signed-off-by: Alexei Starovoitov <ast@kernel.org>
kernel/bpf/core.c