bpf: Remove !func_info and !line_info check from test_btf and bpftool
kernel can provide the func_info and line_info even it fails the btf_dump_raw_ok() test because they don't contain kernel address. This patch removes the corresponding '== 0' test. Signed-off-by: Martin KaFai Lau <kafai@fb.com> Signed-off-by: Daniel Borkmann <daniel@iogearbox.net>
This commit is contained in:

committed by
Daniel Borkmann

parent
9e794163a6
commit
177e77169b
@@ -107,11 +107,7 @@ struct bpf_prog_linfo *bpf_prog_linfo__new(const struct bpf_prog_info *info)
|
||||
|
||||
nr_linfo = info->nr_line_info;
|
||||
|
||||
/*
|
||||
* Test !info->line_info because the kernel may NULL
|
||||
* the ptr if kernel.kptr_restrict is set.
|
||||
*/
|
||||
if (!nr_linfo || !info->line_info)
|
||||
if (!nr_linfo)
|
||||
return NULL;
|
||||
|
||||
/*
|
||||
|
Reference in New Issue
Block a user