]> git.baikalelectronics.ru Git - kernel.git/commit
tools: bpftool: return from do_event_pipe() on bad arguments
authorQuentin Monnet <quentin.monnet@netronome.com>
Thu, 23 Aug 2018 16:46:25 +0000 (17:46 +0100)
committerDaniel Borkmann <daniel@iogearbox.net>
Thu, 23 Aug 2018 18:17:57 +0000 (20:17 +0200)
commit3decc3d05e8832fcd0cc9130bf5f01d4139869d8
treee1980af4eeb23ce968466601262e889b41bc3fed
parentb10a1400d6a4adeecaf772dbe1a474c0699389eb
tools: bpftool: return from do_event_pipe() on bad arguments

When command line parsing fails in the while loop in do_event_pipe()
because the number of arguments is incorrect or because the keyword is
unknown, an error message is displayed, but bpftool remains stuck in
the loop. Make sure we exit the loop upon failure.

Fixes: c85efa93b375 ("tools: bpftool: add simple perf event output reader")
Signed-off-by: Quentin Monnet <quentin.monnet@netronome.com>
Reviewed-by: Jakub Kicinski <jakub.kicinski@netronome.com>
Signed-off-by: Daniel Borkmann <daniel@iogearbox.net>
tools/bpf/bpftool/map_perf_ring.c