ftrace: disable all tracers on corrupted buffer
authorSteven Rostedt <srostedt@redhat.com>
Mon, 12 May 2008 19:20:45 +0000 (21:20 +0200)
committerThomas Gleixner <tglx@linutronix.de>
Fri, 23 May 2008 18:41:22 +0000 (20:41 +0200)
If the trace buffer is detected to be corrupted, then we
disable all tracers.

Signed-off-by: Steven Rostedt <srostedt@redhat.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
kernel/trace/trace_selftest.c

index 4c8a1b2d8231669326abcd2213a9c711d455ce07..a6f1ed75f8368f04f548d604a1b388b2a2e5637a 100644 (file)
@@ -67,6 +67,8 @@ trace_test_buffer_cpu(struct trace_array *tr, struct trace_array_cpu *data)
        return 0;
 
  failed:
+       /* disable tracing */
+       tracing_disabled = 1;
        printk(KERN_CONT ".. corrupted trace buffer .. ");
        return -1;
 }