[3.11.y.z extended stable] Patch "tracing: Add TRACE_ITER_PRINTK flag check in __trace_puts/__trace_bputs" has been added to staging queue
Luis Henriques
luis.henriques at canonical.com
Wed Jul 30 12:47:26 UTC 2014
This is a note to let you know that I have just added a patch titled
tracing: Add TRACE_ITER_PRINTK flag check in __trace_puts/__trace_bputs
to the linux-3.11.y-queue branch of the 3.11.y.z extended stable tree
which can be found at:
http://kernel.ubuntu.com/git?p=ubuntu/linux.git;a=shortlog;h=refs/heads/linux-3.11.y-queue
If you, or anyone else, feels it should not be added to this tree, please
reply to this email.
For more information about the 3.11.y.z tree, see
https://wiki.ubuntu.com/Kernel/Dev/ExtendedStable
Thanks.
-Luis
------
>From 8f60c4252ccb1bea2a7c0de6e911a5f93c827860 Mon Sep 17 00:00:00 2001
From: "zhangwei(Jovi)" <jovi.zhangwei at huawei.com>
Date: Thu, 18 Jul 2013 16:31:18 +0800
Subject: 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 at huawei.com>
Signed-off-by: Steven Rostedt <rostedt at goodmis.org>
Signed-off-by: Luis Henriques <luis.henriques at canonical.com>
---
kernel/trace/trace.c | 6 ++++++
1 file changed, 6 insertions(+)
diff --git a/kernel/trace/trace.c b/kernel/trace/trace.c
index c75803fba4b9..3ef771112cde 100644
--- a/kernel/trace/trace.c
+++ b/kernel/trace/trace.c
@@ -436,6 +436,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))
@@ -483,6 +486,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))
--
1.9.1
More information about the kernel-team
mailing list