summaryrefslogtreecommitdiffstats
path: root/tools/lib/bpf/strset.c
diff options
context:
space:
mode:
authorKumar Kartikeya Dwivedi <memxor@gmail.com>2022-03-20 20:00:03 +0530
committerAlexei Starovoitov <ast@kernel.org>2022-03-20 19:21:38 -0700
commit7ada3787e91c89b0aa7abf47682e8e587b855c13 (patch)
treee85380b9690ec176cbff5a327a1156424250ee71 /tools/lib/bpf/strset.c
parente1cc1f39981b06ba22a0c92e800e9fd8ba59d2d3 (diff)
downloadlinux-7ada3787e91c89b0aa7abf47682e8e587b855c13.tar.bz2
bpf: Check for NULL return from bpf_get_btf_vmlinux
When CONFIG_DEBUG_INFO_BTF is disabled, bpf_get_btf_vmlinux can return a NULL pointer. Check for it in btf_get_module_btf to prevent a NULL pointer dereference. While kernel test robot only complained about this specific case, let's also check for NULL in other call sites of bpf_get_btf_vmlinux. Fixes: 9492450fd287 ("bpf: Always raise reference in btf_get_module_btf") Reported-by: kernel test robot <oliver.sang@intel.com> Signed-off-by: Kumar Kartikeya Dwivedi <memxor@gmail.com> Signed-off-by: Alexei Starovoitov <ast@kernel.org> Link: https://lore.kernel.org/bpf/20220320143003.589540-1-memxor@gmail.com
Diffstat (limited to 'tools/lib/bpf/strset.c')
0 files changed, 0 insertions, 0 deletions