aboutsummaryrefslogtreecommitdiffstats
path: root/kernel/trace/trace.c
diff options
context:
space:
mode:
authorSteven Rostedt <rostedt@goodmis.org>2008-05-12 15:21:01 -0400
committerThomas Gleixner <tglx@linutronix.de>2008-05-23 15:57:01 -0400
commit4823ed7eadf35e4b57ce581327e21d39585f1f32 (patch)
treefb5b568b52f8757ecd9d314be6cacd25c71d7433 /kernel/trace/trace.c
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>
Diffstat (limited to 'kernel/trace/trace.c')
-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,
2455 cnt = PAGE_SIZE - 1; 2455 cnt = PAGE_SIZE - 1;
2456 2456
2457 /* reset all but tr, trace, and overruns */ 2457 /* reset all but tr, trace, and overruns */
2458 iter->pos = -1;
2459 memset(&iter->seq, 0, 2458 memset(&iter->seq, 0,
2460 sizeof(struct trace_iterator) - 2459 sizeof(struct trace_iterator) -
2461 offsetof(struct trace_iterator, seq)); 2460 offsetof(struct trace_iterator, seq));
2461 iter->pos = -1;
2462 2462
2463 /* 2463 /*
2464 * We need to stop all tracing on all CPUS to read the 2464 * We need to stop all tracing on all CPUS to read the