summaryrefslogtreecommitdiff
path: root/kernel
diff options
context:
space:
mode:
authorzhangwei(Jovi) <jovi.zhangwei@huawei.com>2013-07-18 16:31:18 +0800
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2014-07-28 08:08:20 -0700
commite3f5055a5e01daa5587ef2285423be77cb94d463 (patch)
tree1d5a593f791b6060586b95adf84add8c73ba2b12 /kernel
parentab14a3db4b5fcdceee0af0c14b89816bf3938d16 (diff)
tracing: Add TRACE_ITER_PRINTK flag check in __trace_puts/__trace_bputs
commit f0160a5a2912267c02cfe692eac955c360de5fdf upstream. The TRACE_ITER_PRINTK check in __trace_puts/__trace_bputs is missing, so add it, to be consistent with __trace_printk/__trace_bprintk. Those functions are all called by the same function: trace_printk(). Link: http://lkml.kernel.org/p/51E7A7D6.8090900@huawei.com Signed-off-by: zhangwei(Jovi) <jovi.zhangwei@huawei.com> Signed-off-by: Steven Rostedt <rostedt@goodmis.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'kernel')
-rw-r--r--kernel/trace/trace.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/kernel/trace/trace.c b/kernel/trace/trace.c
index 4c32d8e6f246..4dcbf7dc3c51 100644
--- a/kernel/trace/trace.c
+++ b/kernel/trace/trace.c
@@ -468,6 +468,9 @@ int __trace_puts(unsigned long ip, const char *str, int size)
int alloc;
int pc;
+ if (!(trace_flags & TRACE_ITER_PRINTK))
+ return 0;
+
pc = preempt_count();
if (unlikely(tracing_selftest_running || tracing_disabled))
@@ -515,6 +518,9 @@ int __trace_bputs(unsigned long ip, const char *str)
int size = sizeof(struct bputs_entry);
int pc;
+ if (!(trace_flags & TRACE_ITER_PRINTK))
+ return 0;
+
pc = preempt_count();
if (unlikely(tracing_selftest_running || tracing_disabled))