All of lore.kernel.org
 help / color / mirror / Atom feed
From: Li Zefan <lizf@cn.fujitsu.com>
To: Frederic Weisbecker <fweisbec@gmail.com>
Cc: Steven Rostedt <rostedt@goodmis.org>, Ingo Molnar <mingo@elte.hu>,
	"K.Prasad" <prasad@linux.vnet.ibm.com>,
	LKML <linux-kernel@vger.kernel.org>,
	Thomas Gleixner <tglx@linutronix.de>
Subject: [PATCH 2/4] ksym_tracer: Fix to allow writing newline to ksym_trace_filter
Date: Wed, 30 Dec 2009 14:23:19 +0800	[thread overview]
Message-ID: <4B3AF1D7.5040400@cn.fujitsu.com> (raw)
In-Reply-To: <4B3AF19E.1010201@cn.fujitsu.com>

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@cn.fujitsu.com>
---
 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;
-- 
1.6.3


  reply	other threads:[~2009-12-30  6:23 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-12-30  6:22 [PATCH 1/4] ksym_tracer: Fix to make the tracer work Li Zefan
2009-12-30  6:23 ` Li Zefan [this message]
2009-12-30  9:31   ` [tip:tracing/urgent] ksym_tracer: Fix to allow writing newline to ksym_trace_filter tip-bot for Li Zefan
2009-12-30  6:23 ` [PATCH 3/4] ksym_tracer: Fix race when incrementing count Li Zefan
2009-12-30  9:31   ` [tip:tracing/urgent] " tip-bot for Li Zefan
2009-12-30  6:24 ` [PATCH 4/4] ksym_tracer: Remove trace_stat Li Zefan
2009-12-30  9:31   ` [tip:tracing/urgent] " tip-bot for Li Zefan
2009-12-30  9:30 ` [tip:tracing/urgent] ksym_tracer: Fix to make the tracer work tip-bot for Li Zefan
2009-12-30 15:05 ` [PATCH 1/4] " K.Prasad
2009-12-31  5:54   ` Li Zefan
2010-01-10  3:10     ` Frederic Weisbecker

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4B3AF1D7.5040400@cn.fujitsu.com \
    --to=lizf@cn.fujitsu.com \
    --cc=fweisbec@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@elte.hu \
    --cc=prasad@linux.vnet.ibm.com \
    --cc=rostedt@goodmis.org \
    --cc=tglx@linutronix.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.