Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 748ec3a2 authored by Yoshihiro YUNOMAE's avatar Yoshihiro YUNOMAE Committed by Steven Rostedt
Browse files

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: default avatarMasami Hiramatsu <masami.hiramatsu.pt@hitachi.com>
Signed-off-by: default avatarYoshihiro YUNOMAE <yoshihiro.yunomae.ez@hitachi.com>
Signed-off-by: default avatarSteven Rostedt <rostedt@goodmis.org>
parent dc81e5e3
Loading
Loading
Loading
Loading
+3 −0
Original line number Diff line number Diff line
@@ -1377,6 +1377,9 @@ static __init int kprobe_trace_self_tests_init(void)
	struct trace_kprobe *tk;
	struct ftrace_event_file *file;

	if (tracing_is_disabled())
		return -ENODEV;

	target = kprobe_trace_selftest_target;

	pr_info("Testing kprobe tracing: ");