diff options
author | Kumar Kartikeya Dwivedi <[email protected]> | 2022-03-20 20:00:03 +0530 |
---|---|---|
committer | Alexei Starovoitov <[email protected]> | 2022-03-20 19:21:38 -0700 |
commit | 7ada3787e91c89b0aa7abf47682e8e587b855c13 (patch) | |
tree | e85380b9690ec176cbff5a327a1156424250ee71 /net/lapb/lapb_subr.c | |
parent | e1cc1f39981b06ba22a0c92e800e9fd8ba59d2d3 (diff) |
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 <[email protected]>
Signed-off-by: Kumar Kartikeya Dwivedi <[email protected]>
Signed-off-by: Alexei Starovoitov <[email protected]>
Link: https://lore.kernel.org/bpf/[email protected]
Diffstat (limited to 'net/lapb/lapb_subr.c')
0 files changed, 0 insertions, 0 deletions