linux/tools
David Carrillo-Cisneros 2a2f15d5d9 perf inject: Don't proceed if perf_session__process_event() fails
commit bb8d521f77 upstream.

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: e558a5bd8b ("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>
[bwh: Backported to 3.16: adjust context]
Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
History 2017-08-26 02:14:30 +01:00
..
cgroup cgroups: fix cgroup_event_listener error handling 2013-01-08 10:00:44 -08:00
firewire tools/firewire: nosy-dump: check for allocation failure 2012-12-02 20:10:18 +01:00
hv Tools: hv: Handle the case when the target file exists correctly 2014-04-16 14:10:36 -07:00
include perf tools: Move ACCESS_ONCE from perf.h header 2014-05-05 17:49:07 +02:00
lguest tools/lguest: offer VIRTIO_F_ANY_LAYOUT for net device. 2013-07-15 11:18:32 +09:30
lib tools lib traceevent: Do not reassign parg after collapse_tree() 2016-06-15 21:29:32 +01:00
net tools/net: Use include/uapi with __EXPORTED_HEADERS__ 2015-12-14 10:17:12 +00:00
nfsd NFSD: Added fault injection script 2011-11-07 21:10:47 -05:00
perf perf inject: Don't proceed if perf_session__process_event() fails 2017-08-26 02:14:30 +01:00
power cpupower: Fix turbo frequency reporting for pre-Sandy Bridge cores 2017-07-18 18:40:35 +01:00
scripts tools lib traceevent: Add global QUIET_CC_FPIC build output 2013-12-19 16:18:10 -03:00
testing ktest: Fix child exit code processing 2017-06-05 21:17:05 +01:00
thermal/tmon tmon: set umask to a reasonable value 2014-07-01 22:00:51 +08:00
usb tools: ffs-test: fix header values endianess 2014-06-30 13:23:58 -05:00
virtio tools: Consolidate types.h 2014-05-01 21:22:39 +02:00
vm tools/vm/slabinfo: fix an unintentional printf 2016-11-20 01:16:57 +00:00
Makefile tools: Add a "make all" rule 2016-01-25 10:43:31 +00:00