mirror of
https://github.com/Fishwaldo/Star64_linux.git
synced 2025-06-23 15:11:16 +00:00
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:
parent
9e794163a6
commit
177e77169b
3 changed files with 1 additions and 19 deletions
|
@ -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;
|
||||
|
||||
/*
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue