lkml.org 
[lkml]   [2008]   [Apr]   [22]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Date
From
Subject[PATCH] 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>
---
kernel/trace/trace.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

Index: linux-sched-devel.git/kernel/trace/trace.c
===================================================================
--- linux-sched-devel.git.orig/kernel/trace/trace.c 2008-04-22 10:41:58.000000000 -0400
+++ linux-sched-devel.git/kernel/trace/trace.c 2008-04-22 10:42:41.000000000 -0400
@@ -2500,10 +2500,10 @@ tracing_read_pipe(struct file *filp, cha
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


\
 
 \ /
  Last update: 2008-04-23 04:11    [W:0.032 / U:0.024 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site