1
0
Fork 0
remarkable-linux/tools/lib
Steven Rostedt 47348e3fcc tools lib traceevent: Do not reassign parg after collapse_tree()
[ Upstream commit 106b816cb4 ]

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>
Cc: stable@vger.kernel.org # 3.14+
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>
Signed-off-by: Sasha Levin <sasha.levin@oracle.com>
2016-05-17 13:43:11 -04:00
..
api tools lib api: Undefine _FORTIFY_SOURCE before setting it 2015-04-23 17:08:23 -03:00
lockdep tools/liblockdep: Fix compilation error 2015-05-13 06:12:20 -04:00
symbol tools lib symbol: Start carving out symbol parsing routines from perf 2013-12-13 10:30:20 -03:00
traceevent tools lib traceevent: Do not reassign parg after collapse_tree() 2016-05-17 13:43:11 -04:00
util tools lib: Move asm-generic/bitops/find.h code to tools/include and tools/lib 2014-12-17 11:14:48 -03:00