aboutsummaryrefslogtreecommitdiffstats
path: root/tools/bpf/bpftool/prog.c
diff options
context:
space:
mode:
authorMartin KaFai Lau <kafai@fb.com>2018-12-12 13:18:22 -0500
committerDaniel Borkmann <daniel@iogearbox.net>2018-12-13 06:16:31 -0500
commit177e77169b0b71587c74382d5f2207a16da34790 (patch)
treeda39631926f29fbb7dd194f2b87c949631f5ebe8 /tools/bpf/bpftool/prog.c
parent9e794163a69c103633fefb10a3879408d4e4e2c8 (diff)
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>
Diffstat (limited to 'tools/bpf/bpftool/prog.c')
-rw-r--r--tools/bpf/bpftool/prog.c7
1 files changed, 0 insertions, 7 deletions
diff --git a/tools/bpf/bpftool/prog.c b/tools/bpf/bpftool/prog.c
index eddf7fba41c6..ee51279be9c7 100644
--- a/tools/bpf/bpftool/prog.c
+++ b/tools/bpf/bpftool/prog.c
@@ -596,13 +596,6 @@ static int do_dump(int argc, char **argv)
596 goto err_free; 596 goto err_free;
597 } 597 }
598 598
599 if (func_info && !info.func_info) {
600 /* kernel.kptr_restrict is set. No func_info available. */
601 free(func_info);
602 func_info = NULL;
603 nr_finfo = 0;
604 }
605
606 if (linfo && info.nr_line_info != nr_linfo) { 599 if (linfo && info.nr_line_info != nr_linfo) {
607 p_err("incorrect nr_line_info %u vs. expected %u", 600 p_err("incorrect nr_line_info %u vs. expected %u",
608 info.nr_line_info, nr_linfo); 601 info.nr_line_info, nr_linfo);