]> git.ipfire.org Git - thirdparty/linux.git/commitdiff
bpf: Remove WARN_ON_ONCE in check_kfunc_mem_size_reg()
authorYonghong Song <yonghong.song@linux.dev>
Thu, 23 Apr 2026 03:34:41 +0000 (20:34 -0700)
committerAlexei Starovoitov <ast@kernel.org>
Thu, 23 Apr 2026 14:54:50 +0000 (07:54 -0700)
The warning is too late if it does happen. Remove it.

Acked-by: Kumar Kartikeya Dwivedi <memxor@gmail.com>
Signed-off-by: Yonghong Song <yonghong.song@linux.dev>
Link: https://lore.kernel.org/r/20260423033441.2538149-1-yonghong.song@linux.dev
Signed-off-by: Alexei Starovoitov <ast@kernel.org>
kernel/bpf/verifier.c

index 26b6cdfd8613329974899e0f6decb3132f50e927..d123449f5552e7e460fd04a277a9678b45a1f86a 100644 (file)
@@ -7134,8 +7134,6 @@ static int check_kfunc_mem_size_reg(struct bpf_verifier_env *env, struct bpf_reg
        struct bpf_call_arg_meta meta;
        int err;
 
-       WARN_ON_ONCE(regno < BPF_REG_2 || regno > BPF_REG_5);
-
        memset(&meta, 0, sizeof(meta));
 
        if (may_be_null) {