]> git.baikalelectronics.ru Git - kernel.git/commit
tracing: Move pipe reference to trace array instead of current_tracer
authorSteven Rostedt (VMware) <rostedt@goodmis.org>
Tue, 30 Jun 2020 03:45:56 +0000 (23:45 -0400)
committerSteven Rostedt (VMware) <rostedt@goodmis.org>
Tue, 30 Jun 2020 18:29:33 +0000 (14:29 -0400)
commita76c1e2f4cbbac873e533cde2bf0c377fa5346bc
tree8784d94d60792f48e068b83b21fd00db73dfb512
parente86cfc88356abc881e00678dc8599275ff3807d6
tracing: Move pipe reference to trace array instead of current_tracer

If a process has the trace_pipe open on a trace_array, the current tracer
for that trace array should not be changed. This was original enforced by a
global lock, but when instances were introduced, it was moved to the
current_trace. But this structure is shared by all instances, and a
trace_pipe is for a single instance. There's no reason that a process that
has trace_pipe open on one instance should prevent another instance from
changing its current tracer. Move the reference counter to the trace_array
instead.

This is marked as "Fixes" but is more of a clean up than a true fix.
Backport if you want, but its not critical.

Fixes: a2101580e3464 ("tracing: Add ref count to tracer for when they are being read by pipe")
Signed-off-by: Steven Rostedt (VMware) <rostedt@goodmis.org>
kernel/trace/trace.c
kernel/trace/trace.h