From: Steven Rostedt Date: Mon, 12 May 2008 19:21:01 +0000 (+0200) Subject: ftrace: fix setting of pos in read_pipe X-Git-Tag: v2.6.27-rc1~1102^2^2~1^2~39 X-Git-Url: http://pilppa.com/gitweb/?a=commitdiff_plain;h=4823ed7eadf35e4b57ce581327e21d39585f1f32;p=linux-2.6-omap-h63xx.git ftrace: fix setting of pos in read_pipe In resetting the iterator in read_pipe, the reset of pos was postitioned in the wrong location with respect to the memset operation. The current code sets pos, incorrectly, to zero. 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 32f9106d612..49e16630628 100644 --- a/kernel/trace/trace.c +++ b/kernel/trace/trace.c @@ -2455,10 +2455,10 @@ tracing_read_pipe(struct file *filp, char __user *ubuf, cnt = PAGE_SIZE - 1; /* reset all but tr, trace, and overruns */ - iter->pos = -1; memset(&iter->seq, 0, sizeof(struct trace_iterator) - offsetof(struct trace_iterator, seq)); + iter->pos = -1; /* * We need to stop all tracing on all CPUS to read the