summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSteven Rostedt <rostedt@goodmis.org>2008-05-12 21:21:01 +0200
committerThomas Gleixner <tglx@linutronix.de>2008-05-23 21:57:01 +0200
commit4823ed7eadf35e4b57ce581327e21d39585f1f32 (patch)
treefb5b568b52f8757ecd9d314be6cacd25c71d7433
parent2f1dafe50cc4e58a239fd81bd47f87f32042a1ee (diff)
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 <srostedt@redhat.com> Signed-off-by: Ingo Molnar <mingo@elte.hu> Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
-rw-r--r--kernel/trace/trace.c2
1 files changed, 1 insertions, 1 deletions
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