aboutsummaryrefslogtreecommitdiffstats
path: root/kernel/trace/trace.c
diff options
context:
space:
mode:
authorzhangwei(Jovi) <jovi.zhangwei@huawei.com>2013-07-18 04:31:18 -0400
committerSteven Rostedt <rostedt@goodmis.org>2014-07-15 11:58:40 -0400
commitf0160a5a2912267c02cfe692eac955c360de5fdf (patch)
tree5051c26c23d20f8695c4b3abc86685d1c3eae1fe /kernel/trace/trace.c
parent5f8bf2d263a20b986225ae1ed7d6759dc4b93af9 (diff)
tracing: Add TRACE_ITER_PRINTK flag check in __trace_puts/__trace_bputs
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 Cc: stable@vger.kernel.org # 3.11+ Signed-off-by: zhangwei(Jovi) <jovi.zhangwei@huawei.com> Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
Diffstat (limited to 'kernel/trace/trace.c')
-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 a6ffc8918dda..bda9621638cc 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)
468 int alloc; 468 int alloc;
469 int pc; 469 int pc;
470 470
471 if (!(trace_flags & TRACE_ITER_PRINTK))
472 return 0;
473
471 pc = preempt_count(); 474 pc = preempt_count();
472 475
473 if (unlikely(tracing_selftest_running || tracing_disabled)) 476 if (unlikely(tracing_selftest_running || tracing_disabled))
@@ -515,6 +518,9 @@ int __trace_bputs(unsigned long ip, const char *str)
515 int size = sizeof(struct bputs_entry); 518 int size = sizeof(struct bputs_entry);
516 int pc; 519 int pc;
517 520
521 if (!(trace_flags & TRACE_ITER_PRINTK))
522 return 0;
523
518 pc = preempt_count(); 524 pc = preempt_count();
519 525
520 if (unlikely(tracing_selftest_running || tracing_disabled)) 526 if (unlikely(tracing_selftest_running || tracing_disabled))