]> git.baikalelectronics.ru Git - kernel.git/commit
tracing: Clear trace_state when starting trace
authorMasami Hiramatsu <mhiramat@kernel.org>
Mon, 17 Feb 2020 09:52:39 +0000 (18:52 +0900)
committerSteven Rostedt (VMware) <rostedt@goodmis.org>
Thu, 20 Feb 2020 22:48:59 +0000 (17:48 -0500)
commited783330d1b5c893cabd4ae046a94223c3e48452
treecf30ae9e296ce628497350f8b67481170d503c81
parent0e95276ba1883dc2489fdbae5d4e867d1476a6f9
tracing: Clear trace_state when starting trace

Clear trace_state data structure when starting trace
in __synth_event_trace_start() internal function.

Currently trace_state is initialized only in the
synth_event_trace_start() API, but the trace_state
in synth_event_trace() and synth_event_trace_array()
are on the stack without initialization.
This means those APIs will see wrong parameters and
wil skip closing process in __synth_event_trace_end()
because trace_state->disabled may be !0.

Link: http://lkml.kernel.org/r/158193315899.8868.1781259176894639952.stgit@devnote2
Reviewed-by: Tom Zanussi <zanussi@kernel.org>
Signed-off-by: Masami Hiramatsu <mhiramat@kernel.org>
Signed-off-by: Steven Rostedt (VMware) <rostedt@goodmis.org>
kernel/trace/trace_events_hist.c