diff options
author | zhangwei(Jovi) <jovi.zhangwei@huawei.com> | 2013-07-18 16:31:18 +0800 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2014-07-28 08:05:57 -0700 |
commit | 985615b27de9a693d8015d1bfe32d35b24133b9c (patch) | |
tree | e1622b40ec6155637042b251a913726854e80a37 /kernel | |
parent | 0c82c4cc9a9bf733e765d4471926d5a2d93bfeee (diff) | |
download | kernel-common-985615b27de9a693d8015d1bfe32d35b24133b9c.tar.gz kernel-common-985615b27de9a693d8015d1bfe32d35b24133b9c.tar.bz2 kernel-common-985615b27de9a693d8015d1bfe32d35b24133b9c.zip |
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.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/kernel/trace/trace.c b/kernel/trace/trace.c index c076164aa113..7e259b2bdf44 100644 --- a/kernel/trace/trace.c +++ b/kernel/trace/trace.c @@ -456,6 +456,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)) @@ -503,6 +506,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)) |