From: Steven Rostedt Date: Mon, 12 May 2008 19:20:58 +0000 (+0200) Subject: ftrace: return EOF in trace_pipe on change of tracer X-Git-Tag: v2.6.27-rc1~1102^2^2~1^2~55 X-Git-Url: http://pilppa.com/gitweb/?a=commitdiff_plain;h=845279972f1736c3463c9cebd1bad92a0a347176;p=linux-2.6-omap-h63xx.git 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: Steven Rostedt Signed-off-by: Ingo Molnar Signed-off-by: Thomas Gleixner --- diff --git a/kernel/trace/trace.c b/kernel/trace/trace.c index d141fc98f3a..2af940433e9 100644 --- a/kernel/trace/trace.c +++ b/kernel/trace/trace.c @@ -2253,6 +2253,9 @@ tracing_read_pipe(struct file *filp, char __user *ubuf, if (signal_pending(current)) return -EINTR; + if (iter->trace != current_trace) + return 0; + /* * We block until we read something and tracing is disabled. * We still block if tracing is disabled, but we have never