Skip to content

Commit

Permalink
tracing: Add TRACE_ITER_PRINTK flag check in __trace_puts/__trace_bputs
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
zhangwei(Jovi) authored and Steven Rostedt committed Jul 15, 2014
1 parent 5f8bf2d commit f0160a5
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions kernel/trace/trace.c
Original file line number Diff line number Diff line change
Expand Up @@ -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))
Expand Down Expand Up @@ -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))
Expand Down

0 comments on commit f0160a5

Please sign in to comment.