Commit 84527997 authored by Steven Rostedt's avatar Steven Rostedt Committed by Thomas Gleixner

ftrace: return EOF in trace_pipe on change of tracer

Break out of while loop with EOF when the current_trace changes.
Signed-off-by: default avatarSteven Rostedt <srostedt@redhat.com>
Signed-off-by: default avatarIngo Molnar <mingo@elte.hu>
Signed-off-by: default avatarThomas Gleixner <tglx@linutronix.de>
parent b5685aed
...@@ -2253,6 +2253,9 @@ tracing_read_pipe(struct file *filp, char __user *ubuf, ...@@ -2253,6 +2253,9 @@ tracing_read_pipe(struct file *filp, char __user *ubuf,
if (signal_pending(current)) if (signal_pending(current))
return -EINTR; return -EINTR;
if (iter->trace != current_trace)
return 0;
/* /*
* We block until we read something and tracing is disabled. * We block until we read something and tracing is disabled.
* We still block if tracing is disabled, but we have never * We still block if tracing is disabled, but we have never
......
Markdown is supported
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