summaryrefslogtreecommitdiff
path: root/scripts/link-vmlinux.sh
diff options
context:
space:
mode:
authorAlexei Starovoitov <ast@kernel.org>2019-11-27 02:01:06 +0300
committerDaniel Borkmann <daniel@iogearbox.net>2019-11-27 03:04:47 +0300
commitd0f010434124598988ba1c97fbb0e4e820ff5d8c (patch)
tree89d190812932b184d17d6848bf24635dea2680c9 /scripts/link-vmlinux.sh
parenta95069ecb7092d03b2ea1c39ee04514fe9627540 (diff)
downloadlinux-d0f010434124598988ba1c97fbb0e4e820ff5d8c.tar.xz
bpf: Fix static checker warning
kernel/bpf/btf.c:4023 btf_distill_func_proto() error: potentially dereferencing uninitialized 't'. kernel/bpf/btf.c 4012 nargs = btf_type_vlen(func); 4013 if (nargs >= MAX_BPF_FUNC_ARGS) { 4014 bpf_log(log, 4015 "The function %s has %d arguments. Too many.\n", 4016 tname, nargs); 4017 return -EINVAL; 4018 } 4019 ret = __get_type_size(btf, func->type, &t); ^^ t isn't initialized for the first -EINVAL return This is unlikely path, since BTF should have been validated at this point. Fix it by returning 'void' BTF. Reported-by: Dan Carpenter <dan.carpenter@oracle.com> Signed-off-by: Alexei Starovoitov <ast@kernel.org> Signed-off-by: Daniel Borkmann <daniel@iogearbox.net> Link: https://lore.kernel.org/bpf/20191126230106.237179-1-ast@kernel.org
Diffstat (limited to 'scripts/link-vmlinux.sh')
0 files changed, 0 insertions, 0 deletions