Commit 9dba0ae9 authored by Daniel Borkmann's avatar Daniel Borkmann Committed by Alexei Starovoitov
Browse files

bpf: Remove static qualifier from local subprog pointer



The local subprog pointer in create_jt() and visit_abnormal_return_insn()
was declared static.

It is unconditionally assigned via bpf_find_containing_subprog() before
every use. Thus, the static qualifier serves no purpose and rather creates
confusion. Just remove it.

Fixes: e40f5a6b ("bpf: correct stack liveness for tail calls")
Fixes: 493d9e0d ("bpf, x86: add support for indirect jumps")
Signed-off-by: default avatarDaniel Borkmann <daniel@iogearbox.net>
Acked-by: default avatarAnton Protopopov <a.s.protopopov@gmail.com>
Link: https://lore.kernel.org/r/20260408191242.526279-3-daniel@iogearbox.net


Signed-off-by: default avatarAlexei Starovoitov <ast@kernel.org>
parent ee861486
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -19225,7 +19225,7 @@ static struct bpf_iarray *jt_from_subprog(struct bpf_verifier_env *env,
static struct bpf_iarray *
create_jt(int t, struct bpf_verifier_env *env)
{
	static struct bpf_subprog_info *subprog;
	struct bpf_subprog_info *subprog;
	int subprog_start, subprog_end;
	struct bpf_iarray *jt;
	int i;
@@ -19300,7 +19300,7 @@ static int visit_gotox_insn(int t, struct bpf_verifier_env *env)
 */
static int visit_abnormal_return_insn(struct bpf_verifier_env *env, int t)
{
	static struct bpf_subprog_info *subprog;
	struct bpf_subprog_info *subprog;
	struct bpf_iarray *jt;
	if (env->insn_aux_data[t].jt)