android_kernel_oneplus_msm8998/tools/lib
Steven Rostedt (VMware) bacdf1ea16 tools lib traceevent: Do not free tep->cmdlines in add_new_comm() on failure
[ Upstream commit e0d2615856b2046c2e8d5bfd6933f37f69703b0b ]

If the re-allocation of tep->cmdlines succeeds, then the previous
allocation of tep->cmdlines will be freed. If we later fail in
add_new_comm(), we must not free cmdlines, and also should assign
tep->cmdlines to the new allocation. Otherwise when freeing tep, the
tep->cmdlines will be pointing to garbage.

Fixes: a6d2a61ac6 ("tools lib traceevent: Remove some die() calls")
Signed-off-by: Steven Rostedt (VMware) <rostedt@goodmis.org>
Cc: Andrew Morton <akpm@linux-foundation.org>
Cc: Jiri Olsa <jolsa@redhat.com>
Cc: Namhyung Kim <namhyung@kernel.org>
Cc: linux-trace-devel@vger.kernel.org
Cc: stable@vger.kernel.org
Link: http://lkml.kernel.org/r/20190828191819.970121417@goodmis.org
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2019-10-17 13:40:56 -07:00
..
api tools lib api fs: No need to use PATH_MAX + 1 2015-10-05 16:12:09 -03:00
bpf tools/libbpf: handle issues with bpf ELF objects containing .eh_frames 2018-05-30 07:48:57 +02:00
lockdep tools/lib/lockdep: Reduce MAX_LOCK_DEPTH to avoid overflowing lock_chain/: Depth 2017-07-21 07:44:56 +02:00
symbol tools lib symbol: Introduce kallsyms2elf_type 2015-09-30 18:34:31 -03:00
traceevent tools lib traceevent: Do not free tep->cmdlines in add_new_comm() on failure 2019-10-17 13:40:56 -07: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
hweight.c tools: Copy lib/hweight.c from the kernel sources 2015-07-09 16:29:56 -03:00
rbtree.c tools: Copy lib/rbtree.c to tools/lib/ 2015-07-05 22:48:21 -03:00