]> git.baikalelectronics.ru Git - kernel.git/commit
bpf: Remove unnecessary map checks for ARG_PTR_TO_CONST_STR
authorFlorent Revest <revest@chromium.org>
Thu, 22 Apr 2021 23:55:43 +0000 (01:55 +0200)
committerAlexei Starovoitov <ast@kernel.org>
Fri, 23 Apr 2021 16:58:21 +0000 (09:58 -0700)
commit1988d314337ceaab6d5b0c94d1ad0679894dfeb0
tree8282ba0f8b0229af59a7e21bdc5b61b83405dde5
parent3d06729d5893ce82e690e9ac182e79a79a4a255e
bpf: Remove unnecessary map checks for ARG_PTR_TO_CONST_STR

reg->type is enforced by check_reg_type() and map should never be NULL
(it would already have been dereferenced anyway) so these checks are
unnecessary.

Reported-by: Alexei Starovoitov <ast@kernel.org>
Signed-off-by: Florent Revest <revest@chromium.org>
Signed-off-by: Alexei Starovoitov <ast@kernel.org>
Link: https://lore.kernel.org/bpf/20210422235543.4007694-3-revest@chromium.org
kernel/bpf/verifier.c