Message ID | 20230407023650.10145-1-zhongjun@uniontech.com (mailing list archive) |
---|---|
State | Rejected |
Delegated to: | BPF |
Headers | show |
Series | BPF: remove useless condition check | expand |
diff --git a/kernel/bpf/verifier.c b/kernel/bpf/verifier.c index d517d13878cf..21047b26dae7 100644 --- a/kernel/bpf/verifier.c +++ b/kernel/bpf/verifier.c @@ -17655,10 +17655,6 @@ int bpf_check(struct bpf_prog **prog, union bpf_attr *attr, bpfptr_t uattr) int i, len, ret = -EINVAL; bool is_priv; - /* no program is valid */ - if (ARRAY_SIZE(bpf_verifier_ops) == 0) - return -EINVAL; - /* 'struct bpf_verifier_env' can be global, but since it's not small, * allocate/free it every time bpf_check() is called */