• Steven Rostedt (VMware)'s avatar
    tracing: Move pipe reference to trace array instead of current_tracer · 7ef282e0
    Steven Rostedt (VMware) authored
    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: cf6ab6d9 ("tracing: Add ref count to tracer for when they are being read by pipe")
    Signed-off-by: default avatarSteven Rostedt (VMware) <rostedt@goodmis.org>
    7ef282e0
trace.h 65.6 KB