aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorYoshihiro YUNOMAE <yoshihiro.yunomae.ez@hitachi.com>2014-06-05 18:35:20 -0400
committerSteven Rostedt <rostedt@goodmis.org>2014-06-06 04:53:39 -0400
commit748ec3a20eb44fce19af3cef04f8db8a8e7aead3 (patch)
tree42c864429c252b68d5ffd2e9af7be05a63e1521c
parentdc81e5e3abb9f98a3cb6f269c0bee595b2c1235d (diff)
tracing/kprobes: Avoid self tests if tracing is disabled on boot up
If tracing is disabled on boot up, the kernel should not execute tracing self tests. The kernel should check whether tracing is disabled or not before executing any of the tracing self tests. Link: http://lkml.kernel.org/p/20140605223520.32311.56097.stgit@yunodevel Acked-by: Masami Hiramatsu <masami.hiramatsu.pt@hitachi.com> Signed-off-by: Yoshihiro YUNOMAE <yoshihiro.yunomae.ez@hitachi.com> Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
-rw-r--r--kernel/trace/trace_kprobe.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/kernel/trace/trace_kprobe.c b/kernel/trace/trace_kprobe.c
index 903ae28962be..ef2fba1f46b5 100644
--- a/kernel/trace/trace_kprobe.c
+++ b/kernel/trace/trace_kprobe.c
@@ -1377,6 +1377,9 @@ static __init int kprobe_trace_self_tests_init(void)
1377 struct trace_kprobe *tk; 1377 struct trace_kprobe *tk;
1378 struct ftrace_event_file *file; 1378 struct ftrace_event_file *file;
1379 1379
1380 if (tracing_is_disabled())
1381 return -ENODEV;
1382
1380 target = kprobe_trace_selftest_target; 1383 target = kprobe_trace_selftest_target;
1381 1384
1382 pr_info("Testing kprobe tracing: "); 1385 pr_info("Testing kprobe tracing: ");