diff options
author | Steven Rostedt <rostedt@goodmis.org> | 2008-05-12 15:20:58 -0400 |
---|---|---|
committer | Thomas Gleixner <tglx@linutronix.de> | 2008-05-23 15:47:01 -0400 |
commit | 845279972f1736c3463c9cebd1bad92a0a347176 (patch) | |
tree | f71598851ca347068940ecce23458cad06120f6d /kernel/trace/trace.c | |
parent | b5685aede3b7b65e72ddc73b951aa1f70798a614 (diff) |
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 <srostedt@redhat.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Diffstat (limited to 'kernel/trace/trace.c')
-rw-r--r-- | kernel/trace/trace.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/kernel/trace/trace.c b/kernel/trace/trace.c index d141fc98f3a8..2af940433e96 100644 --- a/kernel/trace/trace.c +++ b/kernel/trace/trace.c | |||
@@ -2253,6 +2253,9 @@ tracing_read_pipe(struct file *filp, char __user *ubuf, | |||
2253 | if (signal_pending(current)) | 2253 | if (signal_pending(current)) |
2254 | return -EINTR; | 2254 | return -EINTR; |
2255 | 2255 | ||
2256 | if (iter->trace != current_trace) | ||
2257 | return 0; | ||
2258 | |||
2256 | /* | 2259 | /* |
2257 | * We block until we read something and tracing is disabled. | 2260 | * We block until we read something and tracing is disabled. |
2258 | * We still block if tracing is disabled, but we have never | 2261 | * We still block if tracing is disabled, but we have never |