]> git.proxmox.com Git - mirror_ubuntu-zesty-kernel.git/commit
tracing: Do not start benchmark on boot up
authorSteven Rostedt (Red Hat) <rostedt@goodmis.org>
Mon, 28 Nov 2016 18:17:25 +0000 (13:17 -0500)
committerSteven Rostedt <rostedt@goodmis.org>
Fri, 9 Dec 2016 14:14:00 +0000 (09:14 -0500)
commit1dd349ab74d278cee50fc24dc26c023f3b149642
tree58adadd49877f222a88007c10dc35eb2e160a02f
parent8cf868affdc459beee1a941df0cfaba1673740e3
tracing: Do not start benchmark on boot up

Trace events are enabled very early on boot up via the boot command line
parameter. The benchmark tool creates a new thread to perform the trace
event benchmarking. But at start up, it is called before scheduling is set
up and because it creates a new thread before the init thread is created,
this crashes the kernel.

Have the benchmark fail to register when started via the kernel command
line.

Also, since the registering of a tracepoint now can handle failure cases,
return -ENOMEM instead of warning if the thread cannot be created.

Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
kernel/trace/trace_benchmark.c