aboutsummaryrefslogtreecommitdiffstats
path: root/kernel/trace/trace_selftest.c
diff options
context:
space:
mode:
authorSteven Rostedt <srostedt@redhat.com>2008-05-12 15:20:48 -0400
committerThomas Gleixner <tglx@linutronix.de>2008-05-23 14:54:16 -0400
commit4eebcc81a33fbc45e28542b50197ed7b3c486d90 (patch)
tree13bbad50aa8d4dc36d630ef08886876f4dc0b6eb /kernel/trace/trace_selftest.c
parent37ad508419f0fdfda7b378756eb1f35cfd26d96d (diff)
ftrace: disable tracing on failure
Since ftrace touches practically every function. If we detect any anomaly, we want to fully disable ftrace. This patch adds code to try shutdown ftrace as much as possible without doing any more harm is something is detected not quite correct. This only kills ftrace, this patch does have checks for other parts of the tracer (irqsoff, wakeup, etc.). Signed-off-by: Steven Rostedt <srostedt@redhat.com> Signed-off-by: Ingo Molnar <mingo@elte.hu> Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Diffstat (limited to 'kernel/trace/trace_selftest.c')
-rw-r--r--kernel/trace/trace_selftest.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/kernel/trace/trace_selftest.c b/kernel/trace/trace_selftest.c
index a6f1ed75f836..85715b86a342 100644
--- a/kernel/trace/trace_selftest.c
+++ b/kernel/trace/trace_selftest.c
@@ -248,6 +248,10 @@ trace_selftest_startup_function(struct tracer *trace, struct trace_array *tr)
248 ftrace_enabled = save_ftrace_enabled; 248 ftrace_enabled = save_ftrace_enabled;
249 tracer_enabled = save_tracer_enabled; 249 tracer_enabled = save_tracer_enabled;
250 250
251 /* kill ftrace totally if we failed */
252 if (ret)
253 ftrace_kill();
254
251 return ret; 255 return ret;
252} 256}
253#endif /* CONFIG_FTRACE */ 257#endif /* CONFIG_FTRACE */