Commit 313254a9 authored by Li Zefan's avatar Li Zefan Committed by Frederic Weisbecker
Browse files

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

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: default avatarLi Zefan <>
Acked-by: default avatarSteven Rostedt <>
LKML-Reference: <>
Signed-off-by: default avatarFrederic Weisbecker <>
parent 311d16da
......@@ -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);
if (ret)
goto out_unlock;
ret = read;
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment