From: Steven Rostedt Date: Mon, 12 May 2008 19:21:01 +0000 (+0200) Subject: ftrace: fix setting of pos in read_pipe X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=4823ed7eadf35e4b57ce581327e21d39585f1f32;p=GitHub%2Fexynos8895%2Fandroid_kernel_samsung_universal8895.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 32f9106d612c..49e16630628a 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