Commit e12331d9 authored by zhangwei(Jovi)'s avatar zhangwei(Jovi) Committed by Jiri Slaby

tracing: Add TRACE_ITER_PRINTK flag check in __trace_puts/__trace_bputs

commit f0160a5a 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.comSigned-off-by: default avatarzhangwei(Jovi) <jovi.zhangwei@huawei.com>
Signed-off-by: default avatarSteven Rostedt <rostedt@goodmis.org>
Signed-off-by: default avatarJiri Slaby <jslaby@suse.cz>
parent cce7b584
...@@ -436,6 +436,9 @@ int __trace_puts(unsigned long ip, const char *str, int size) ...@@ -436,6 +436,9 @@ int __trace_puts(unsigned long ip, const char *str, int size)
int alloc; int alloc;
int pc; int pc;
if (!(trace_flags & TRACE_ITER_PRINTK))
return 0;
pc = preempt_count(); pc = preempt_count();
if (unlikely(tracing_selftest_running || tracing_disabled)) if (unlikely(tracing_selftest_running || tracing_disabled))
...@@ -483,6 +486,9 @@ int __trace_bputs(unsigned long ip, const char *str) ...@@ -483,6 +486,9 @@ int __trace_bputs(unsigned long ip, const char *str)
int size = sizeof(struct bputs_entry); int size = sizeof(struct bputs_entry);
int pc; int pc;
if (!(trace_flags & TRACE_ITER_PRINTK))
return 0;
pc = preempt_count(); pc = preempt_count();
if (unlikely(tracing_selftest_running || tracing_disabled)) if (unlikely(tracing_selftest_running || tracing_disabled))
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment