summaryrefslogtreecommitdiffstats
path: root/kernel/trace/ring_buffer.c
diff options
context:
space:
mode:
authorSteven Rostedt (Red Hat) <rostedt@goodmis.org>2013-05-23 17:51:10 +0200
committerSteven Rostedt <rostedt@goodmis.org>2013-05-23 17:57:25 +0200
commitca1643186d3dce6171d8f171e516b02496360a9e (patch)
tree35e8b4bacd61a022ca8d3259cc01606b924ab109 /kernel/trace/ring_buffer.c
parenttracing: Return -EBUSY when event_enable_func() fails to get module (diff)
downloadlinux-ca1643186d3dce6171d8f171e516b02496360a9e.tar.xz
linux-ca1643186d3dce6171d8f171e516b02496360a9e.zip
tracing: Fix crash when ftrace=nop on the kernel command line
If ftrace=<tracer> is on the kernel command line, when that tracer is registered, it will be initiated by tracing_set_tracer() to execute that tracer. The nop tracer is just a stub tracer that is used to have no tracer enabled. It is assigned at early bootup as it is the default tracer. But if ftrace=nop is on the kernel command line, the registering of the nop tracer will call tracing_set_tracer() which will try to execute the nop tracer. But it expects tr->current_trace to be assigned something as it usually is assigned to the nop tracer. As it hasn't been assigned to anything yet, it causes the system to crash. The simple fix is to move the tr->current_trace = nop before registering the nop tracer. The functionality is still the same as the nop tracer doesn't do anything anyway. Reported-by: Peter Zijlstra <peterz@infradead.org> Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
Diffstat (limited to 'kernel/trace/ring_buffer.c')
0 files changed, 0 insertions, 0 deletions