[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <tip-313254a9400d388b46150c0f355e216418a2f598@git.kernel.org>
Date: Mon, 14 Dec 2009 09:46:33 GMT
From: tip-bot for Li Zefan <lizf@...fujitsu.com>
To: linux-tip-commits@...r.kernel.org
Cc: linux-kernel@...r.kernel.org, hpa@...or.com, mingo@...hat.com,
fweisbec@...il.com, rostedt@...dmis.org, lizf@...fujitsu.com,
tglx@...utronix.de
Subject: [tip:tracing/urgent] ftrace: Call trace_parser_clear() properly
Commit-ID: 313254a9400d388b46150c0f355e216418a2f598
Gitweb: http://git.kernel.org/tip/313254a9400d388b46150c0f355e216418a2f598
Author: Li Zefan <lizf@...fujitsu.com>
AuthorDate: Tue, 8 Dec 2009 11:15:30 +0800
Committer: Frederic Weisbecker <fweisbec@...il.com>
CommitDate: Sun, 13 Dec 2009 18:37:26 +0100
ftrace: Call trace_parser_clear() properly
I found a weird behavior:
# echo 'fuse:*' > set_ftrace_filter
bash: echo: write error: Invalid argument
# cat set_ftrace_filter
fuse_dev_fasync
fuse_dev_poll
fuse_copy_do
We should call trace_parser_clear() no matter ftrace_process_regex()
returns 0 or -errno, otherwise we will actually take the unaccepted
records from ftrace_regex_release().
Signed-off-by: Li Zefan <lizf@...fujitsu.com>
Acked-by: Steven Rostedt <rostedt@...dmis.org>
LKML-Reference: <4B1DC4D2.3000406@...fujitsu.com>
Signed-off-by: Frederic Weisbecker <fweisbec@...il.com>
---
kernel/trace/ftrace.c | 3 +--
1 files changed, 1 insertions(+), 2 deletions(-)
diff --git a/kernel/trace/ftrace.c b/kernel/trace/ftrace.c
index 08a3fb5..ff8aecd 100644
--- a/kernel/trace/ftrace.c
+++ b/kernel/trace/ftrace.c
@@ -2208,10 +2208,9 @@ ftrace_regex_write(struct file *file, const char __user *ubuf,
!trace_parser_cont(parser)) {
ret = ftrace_process_regex(parser->buffer,
parser->idx, enable);
+ trace_parser_clear(parser);
if (ret)
goto out_unlock;
-
- trace_parser_clear(parser);
}
ret = read;
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists