Files
i2som-imx-linux/include/linux
Steven Rostedt (Red Hat) 2ec6dac110 tracing: Fix trace_printk() to print when not using bprintk()
commit 3debb0a9dd upstream.

The trace_printk() code will allocate extra buffers if the compile detects
that a trace_printk() is used. To do this, the format of the trace_printk()
is saved to the __trace_printk_fmt section, and if that section is bigger
than zero, the buffers are allocated (along with a message that this has
happened).

If trace_printk() uses a format that is not a constant, and thus something
not guaranteed to be around when the print happens, the compiler optimizes
the fmt out, as it is not used, and the __trace_printk_fmt section is not
filled. This means the kernel will not allocate the special buffers needed
for the trace_printk() and the trace_printk() will not write anything to the
tracing buffer.

Adding a "__used" to the variable in the __trace_printk_fmt section will
keep it around, even though it is set to NULL. This will keep the string
from being printed in the debugfs/tracing/printk_formats section as it is
not needed.

Reported-by: Vlastimil Babka <vbabka@suse.cz>
Fixes: 07d777fe8c "tracing: Add percpu buffers for trace_printk()"
Cc: stable@vger.kernel.org # v3.5+
Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
Signed-off-by: Willy Tarreau <w@1wt.eu>
2016-06-07 10:42:47 +02:00
..
2013-05-17 14:31:05 -04:00
2015-04-29 10:33:54 +02:00
2013-12-04 10:56:22 -08:00
2013-05-07 19:46:02 -07:00
2016-03-09 15:31:54 -08:00
2013-12-08 07:29:27 -08:00
2013-05-01 16:36:22 +05:30
2013-07-28 16:30:11 -07:00
2013-05-07 18:38:27 -07:00
2013-04-29 18:28:40 -07:00
2015-07-03 19:48:08 -07:00
2013-10-13 16:08:28 -07:00
2014-04-03 12:01:05 -07:00
2014-06-26 15:12:38 -04:00
2013-07-28 16:30:05 -07:00
2013-04-30 17:04:06 -07:00
2013-04-30 17:04:00 -07:00
2013-10-13 16:08:35 -07:00
2015-04-29 10:34:00 +02:00
2013-07-21 18:21:29 -07:00
2014-01-15 15:28:47 -08:00
2016-03-03 15:06:24 -08:00
2013-05-04 14:47:26 -04:00
2013-04-29 15:54:28 -07:00
2014-02-13 13:47:59 -08:00
2013-04-29 15:54:28 -07:00
2013-04-30 15:50:12 +05:30
2013-07-28 16:29:55 -07:00