linux/tools
Steven Rostedt e46e5c256c tools lib traceevent: Do not reassign parg after collapse_tree()
commit 106b816cb4 upstream.

At the end of process_filter(), collapse_tree() was changed to update
the parg parameter, but the reassignment after the call wasn't removed.

What happens is that the "current_op" gets modified and freed and parg
is assigned to the new allocated argument. But after the call to
collapse_tree(), parg is assigned again to the just freed "current_op",
and this causes the tool to crash.

The current_op variable must also be assigned to NULL in case of error,
otherwise it will cause it to be free()ed twice.

Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
Acked-by: Namhyung Kim <namhyung@kernel.org>
Fixes: 42d6194d13 ("tools lib traceevent: Refactor process_filter()")
Link: http://lkml.kernel.org/r/20160511150936.678c18a1@gandalf.local.home
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 2016-06-15 21:29:32 +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 stat: Document --detailed option 2016-05-01 00:05:54 +02:00
power tools/power turbostat: Use $(CURDIR) instead of $(PWD) and add support for O= option in Makefile 2015-05-06 11:33:10 +01:00
scripts tools lib traceevent: Add global QUIET_CC_FPIC build output 2013-12-19 16:18:10 -03:00
testing efi: Make efivarfs entries immutable by default 2016-03-24 10:01:20 +00: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 Revert "tools/vm: fix page-flags build" 2015-06-30 17:15:30 +01:00
Makefile tools: Add a "make all" rule 2016-01-25 10:43:31 +00:00