[tip:tracing/urgent] ksym_tracer: Fix to allow writing newline to ksym_trace_filter

From: tip-bot for Li Zefan
Date: Wed Dec 30 2009 - 04:32:06 EST


Commit-ID: 3d13ec2efdb5843ad91e57b60d50b44d922cf063
Gitweb: http://git.kernel.org/tip/3d13ec2efdb5843ad91e57b60d50b44d922cf063
Author: Li Zefan <lizf@xxxxxxxxxxxxxx>
AuthorDate: Wed, 30 Dec 2009 14:23:19 +0800
Committer: Ingo Molnar <mingo@xxxxxxx>
CommitDate: Wed, 30 Dec 2009 07:50:49 +0100

ksym_tracer: Fix to allow writing newline to ksym_trace_filter

It used to work, but now doesn't:

# echo > ksym_filter
bash: echo: write error: Invalid argument

It's caused by d954fbf0ff6b5fdfb32350e85a2f15d3db976506
("tracing: Fix wrong usage of strstrip in trace_ksyms").

Signed-off-by: Li Zefan <lizf@xxxxxxxxxxxxxx>
Cc: Steven Rostedt <rostedt@xxxxxxxxxxx>
Cc: K.Prasad <prasad@xxxxxxxxxxxxxxxxxx>
Cc: Frederic Weisbecker <fweisbec@xxxxxxxxx>
LKML-Reference: <4B3AF1D7.5040400@xxxxxxxxxxxxxx>
Signed-off-by: Ingo Molnar <mingo@xxxxxxx>
---
kernel/trace/trace_ksym.c | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/kernel/trace/trace_ksym.c b/kernel/trace/trace_ksym.c
index 340b6ff..160a8d8 100644
--- a/kernel/trace/trace_ksym.c
+++ b/kernel/trace/trace_ksym.c
@@ -299,8 +299,8 @@ static ssize_t ksym_trace_filter_write(struct file *file,
* 2: echo 0 > ksym_trace_filter
* 3: echo "*:---" > ksym_trace_filter
*/
- if (!buf[0] || !strcmp(buf, "0") ||
- !strcmp(buf, "*:---")) {
+ if (!input_string[0] || !strcmp(input_string, "0") ||
+ !strcmp(input_string, "*:---")) {
__ksym_trace_reset();
ret = 0;
goto out;
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/