]> git.karo-electronics.de Git - karo-tx-linux.git/commitdiff
tracing: Have tracing_off() actually turn tracing off
authorSteven Rostedt <srostedt@redhat.com>
Wed, 6 Jun 2012 23:50:40 +0000 (19:50 -0400)
committerSteven Rostedt <rostedt@goodmis.org>
Thu, 7 Jun 2012 02:15:14 +0000 (22:15 -0400)
A recent update to have tracing_on/off() only affect the ftrace ring
buffers instead of all ring buffers had a cut and paste error.
The tracing_off() did the exact same thing as tracing_on() and
would not actually turn off tracing. Unfortunately, tracing_off()
is more important to be working than tracing_on() as this is a key
development tool, as it lets the developer turn off tracing as soon
as a problem is discovered. It is also used by panic and oops code.

This bug also breaks the 'echo func:traceoff > set_ftrace_filter'

Cc: <stable@vger.kernel.org> # 3.4
Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
kernel/trace/trace.c

index 68032c6177dbb84a28d0bc432773f841101c11b4..49249c28690dbb21b6914e2907b16af56e1094c9 100644 (file)
@@ -371,7 +371,7 @@ EXPORT_SYMBOL_GPL(tracing_on);
 void tracing_off(void)
 {
        if (global_trace.buffer)
-               ring_buffer_record_on(global_trace.buffer);
+               ring_buffer_record_off(global_trace.buffer);
        /*
         * This flag is only looked at when buffers haven't been
         * allocated yet. We don't really care about the race