Skip to content

Commit

Permalink
ftrace: return EOF in trace_pipe on change of tracer
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Steven Rostedt authored and Thomas Gleixner committed May 23, 2008
1 parent b5685ae commit 8452799
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions kernel/trace/trace.c
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 8452799

Please sign in to comment.