Commit 0d306c31 authored by Prashant Bhole's avatar Prashant Bhole Committed by Alexei Starovoitov

bpf: use BPF_CAST_CALL for casting bpf call

verifier.c uses BPF_CAST_CALL for casting bpf call except at one
place in jit_subprogs(). Let's use the macro for consistency.
Signed-off-by: default avatarPrashant Bhole <bhole_prashant_q7@lab.ntt.co.jp>
Acked-by: default avatarSong Liu <songliubraving@fb.com>
Signed-off-by: default avatarAlexei Starovoitov <ast@kernel.org>
parent 725721a6
...@@ -7647,8 +7647,7 @@ static int jit_subprogs(struct bpf_verifier_env *env) ...@@ -7647,8 +7647,7 @@ static int jit_subprogs(struct bpf_verifier_env *env)
insn->src_reg != BPF_PSEUDO_CALL) insn->src_reg != BPF_PSEUDO_CALL)
continue; continue;
subprog = insn->off; subprog = insn->off;
insn->imm = (u64 (*)(u64, u64, u64, u64, u64)) insn->imm = BPF_CAST_CALL(func[subprog]->bpf_func) -
func[subprog]->bpf_func -
__bpf_call_base; __bpf_call_base;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment