summaryrefslogtreecommitdiffstats
path: root/kernel
diff options
context:
space:
mode:
authorLi Zefan <lizf@cn.fujitsu.com>2009-12-08 11:15:30 +0800
committerFrederic Weisbecker <fweisbec@gmail.com>2009-12-13 18:37:26 +0100
commit313254a9400d388b46150c0f355e216418a2f598 (patch)
tree190c360ad60b27763e2f95dc5cf8fa9068d3d71e /kernel
parent311d16da575f53c3367099579736c1d233efe0dc (diff)
downloadop-kernel-dev-313254a9400d388b46150c0f355e216418a2f598.zip
op-kernel-dev-313254a9400d388b46150c0f355e216418a2f598.tar.gz
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@cn.fujitsu.com> Acked-by: Steven Rostedt <rostedt@goodmis.org> LKML-Reference: <4B1DC4D2.3000406@cn.fujitsu.com> Signed-off-by: Frederic Weisbecker <fweisbec@gmail.com>
Diffstat (limited to 'kernel')
-rw-r--r--kernel/trace/ftrace.c3
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;
OpenPOWER on IntegriCloud