]> git.baikalelectronics.ru Git - kernel.git/commit
tracing: Check if tracing is enabled in trace_puts()
authorSteven Rostedt (Red Hat) <rostedt@goodmis.org>
Thu, 23 Jan 2014 17:27:59 +0000 (12:27 -0500)
committerSteven Rostedt <rostedt@goodmis.org>
Thu, 23 Jan 2014 17:27:59 +0000 (12:27 -0500)
commitd0cb56218dd9b359bb2889aeca516d7482f7d4b4
tree2539c98c79927f04ebc1a2ab3ee1517a284c67b1
parent02794542930e4b71ded15a3d79d45587dffca593
tracing: Check if tracing is enabled in trace_puts()

If trace_puts() is used very early in boot up, it can crash the machine
if it is called before the ring buffer is allocated. If a trace_printk()
is used with no arguments, then it will be converted into a trace_puts()
and suffer the same fate.

Cc: stable@vger.kernel.org # 3.10+
Fixes: 5555277f5092 "tracing: Add trace_puts() for even faster trace_printk() tracing"
Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
kernel/trace/trace.c