tracing: Fix use-after-free in hist_register_trigger()
authorTom Zanussi <tom.zanussi@linux.intel.com>
Thu, 30 Jun 2016 00:56:00 +0000 (19:56 -0500)
committerSteven Rostedt <rostedt@goodmis.org>
Tue, 2 Aug 2016 19:16:30 +0000 (15:16 -0400)
commit7522c03ae307e657114ff909aec650304371a134
tree9c37bee66e0044d8a2c3b0dfc68810bb7942b9b7
parent47c1856971dd05cac730f70d073518da021b2e5c
tracing: Fix use-after-free in hist_register_trigger()

This fixes a use-after-free case flagged by KASAN; make sure the test
happens before the potential free in this case.

Link: http://lkml.kernel.org/r/48fd74ab61bebd7dca9714386bb47d7c5ccd6a7b.1467247517.git.tom.zanussi@linux.intel.com
Signed-off-by: Tom Zanussi <tom.zanussi@linux.intel.com>
Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
kernel/trace/trace_events_hist.c