diff options
Diffstat (limited to 'kernel/bpf')
-rw-r--r-- | kernel/bpf/verifier.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/kernel/bpf/verifier.c b/kernel/bpf/verifier.c index bdf4192a889b..e6b522496250 100644 --- a/kernel/bpf/verifier.c +++ b/kernel/bpf/verifier.c | |||
@@ -755,7 +755,7 @@ static int check_func_arg(struct verifier_env *env, u32 regno, | |||
755 | enum bpf_reg_type expected_type; | 755 | enum bpf_reg_type expected_type; |
756 | int err = 0; | 756 | int err = 0; |
757 | 757 | ||
758 | if (arg_type == ARG_ANYTHING) | 758 | if (arg_type == ARG_DONTCARE) |
759 | return 0; | 759 | return 0; |
760 | 760 | ||
761 | if (reg->type == NOT_INIT) { | 761 | if (reg->type == NOT_INIT) { |
@@ -763,6 +763,9 @@ static int check_func_arg(struct verifier_env *env, u32 regno, | |||
763 | return -EACCES; | 763 | return -EACCES; |
764 | } | 764 | } |
765 | 765 | ||
766 | if (arg_type == ARG_ANYTHING) | ||
767 | return 0; | ||
768 | |||
766 | if (arg_type == ARG_PTR_TO_STACK || arg_type == ARG_PTR_TO_MAP_KEY || | 769 | if (arg_type == ARG_PTR_TO_STACK || arg_type == ARG_PTR_TO_MAP_KEY || |
767 | arg_type == ARG_PTR_TO_MAP_VALUE) { | 770 | arg_type == ARG_PTR_TO_MAP_VALUE) { |
768 | expected_type = PTR_TO_STACK; | 771 | expected_type = PTR_TO_STACK; |