tracing: add protection around open use of current_tracer
commitd8e83d26b5ab3b31ee0ff6d093a2627707a1e221
authorSteven Rostedt <srostedt@redhat.com>
Fri, 27 Feb 2009 04:55:58 +0000 (26 23:55 -0500)
committerSteven Rostedt <srostedt@redhat.com>
Fri, 27 Feb 2009 04:55:58 +0000 (26 23:55 -0500)
treea8a24753ca24db4f3dd9bb887962e4cdcffac314
parent577b785f55168d5acb3d123ba41bfe8d7981e044
tracing: add protection around open use of current_tracer

Impact: fix to possible race conditions

There's some uses of current_tracer that is not protected by the
trace_types_lock. There is a small chance that a sysadmin changes
the tracer while the current_tracer is being referenced.

If the race is hit, it is unlikely to cause any harm since the
tracers are constant and are not freed. But some strang side
effects may occur.

Signed-off-by: Steven Rostedt <srostedt@redhat.com>
kernel/trace/trace.c