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 <[email protected]>
Signed-off-by: Daniel Borkmann <[email protected]>
This commit is contained in:
Martin KaFai Lau 2018-12-12 10:18:22 -08:00 • committed by Daniel Borkmann
commit 177e77169b
3 changed files with 1 additions and 19 deletions

View file

@ -596,13 +596,6 @@ static int do_dump(int argc, char **argv)
goto err_free;
}
if (func_info && !info.func_info) {
/* kernel.kptr_restrict is set. No func_info available. */
free(func_info);
func_info = NULL;
nr_finfo = 0;
}
if (linfo && info.nr_line_info != nr_linfo) {
p_err("incorrect nr_line_info %u vs. expected %u",
info.nr_line_info, nr_linfo);