tracing: Protect ftrace_trace_arrays list in trace_events.c

There are multiple places where the ftrace_trace_arrays list is accessed in
trace_events.c without the trace_types_lock held.

Link: http://lkml.kernel.org/r/1372732674-22726-1-git-send-email-azl@google.com

Cc: Vaibhav Nagarnaik <vnagarnaik@google.com>
Cc: David Sharp <dhsharp@google.com>
Cc: Alexander Z Lam <lambchop468@gmail.com>
Cc: stable@vger.kernel.org # 3.10
Signed-off-by: Alexander Z Lam <azl@google.com>
Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
This commit is contained in:
Alexander Z Lam
2013-07-01 19:37:54 -07:00
committed by Steven Rostedt
parent 2d71619c59
commit a82274151a
3 changed files with 13 additions and 2 deletions

View File

@@ -266,7 +266,7 @@ static struct tracer *trace_types __read_mostly;
/*
* trace_types_lock is used to protect the trace_types list.
*/
static DEFINE_MUTEX(trace_types_lock);
DEFINE_MUTEX(trace_types_lock);
/*
* serialize the access of the ring buffer