diff options
author | David Carrillo-Cisneros <davidcc@google.com> | 2017-04-10 23:14:26 +0300 |
---|---|---|
committer | Arnaldo Carvalho de Melo <acme@redhat.com> | 2017-04-11 21:23:40 +0300 |
commit | bb8d521f77f3e68a713456b7fb1e99f52ff3342c (patch) | |
tree | 14a98843a1ac685332074acee873a381d8ed513a /tools/perf/util/ordered-events.c | |
parent | d9f8dfa9baf9b6ae1f2f84f887176558ecde5268 (diff) | |
download | linux-bb8d521f77f3e68a713456b7fb1e99f52ff3342c.tar.xz |
perf inject: Don't proceed if perf_session__process_event() fails
All paths following perf_session__process_event() in __cmd_inject() are
useless if __cmd_inject() is to fail, some depend on a correct
session->evlist.
First commit to add code that depends on session->evlist without checking
error was commmit e558a5bd8b ("perf inject: Work with files"). It has
grown since then.
Change __cmd_inject() to fail immediately after
perf_session__process_event() fails.
Signed-off-by: David Carrillo-Cisneros <davidcc@google.com>
Acked-by: Jiri Olsa <jolsa@kernel.org>
Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com>
Cc: Andi Kleen <ak@linux.intel.com>
Cc: Andrew Vagin <avagin@openvz.org>
Cc: He Kuang <hekuang@huawei.com>
Cc: Masami Hiramatsu <mhiramat@kernel.org>
Cc: Paul Turner <pjt@google.com>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Simon Que <sque@chromium.org>
Cc: Stephane Eranian <eranian@google.com>
Cc: Wang Nan <wangnan0@huawei.com>
Fixes: e558a5bd8b74 ("perf inject: Work with files")
Link: http://lkml.kernel.org/r/20170410201432.24807-2-davidcc@google.com
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Diffstat (limited to 'tools/perf/util/ordered-events.c')
0 files changed, 0 insertions, 0 deletions