The bpf_prog_check_recur() funciton is currently used by trampoline and tracing programs (also using trampoline) to check whether a particular prog supports recursion checking or not. The default case (non-trampoline progs) return true in the current implementation. Let us make the non-trampoline prog recursion check return false instead. It does not impact any existing use cases and allows the function to be used outside the trampoline context in the next patch. Signed-off-by: Yonghong Song <yonghong.song@xxxxxxxxx> --- include/linux/bpf_verifier.h | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/include/linux/bpf_verifier.h b/include/linux/bpf_verifier.h index 4513372c5bc8..ad887c68d3e1 100644 --- a/include/linux/bpf_verifier.h +++ b/include/linux/bpf_verifier.h @@ -889,9 +889,8 @@ static inline bool bpf_prog_check_recur(const struct bpf_prog *prog) return prog->expected_attach_type != BPF_TRACE_ITER; case BPF_PROG_TYPE_STRUCT_OPS: case BPF_PROG_TYPE_LSM: - return false; default: - return true; + return false; } } -- 2.43.5