* [PATCH] ftrace: fix setting of pos in read_pipe
@ 2008-04-23 2:08 Steven Rostedt
2008-04-23 9:52 ` Ingo Molnar
0 siblings, 1 reply; 3+ messages in thread
From: Steven Rostedt @ 2008-04-23 2:08 UTC (permalink / raw)
To: LKML
Cc: Ingo Molnar, Peter Zijlstra, akpm, Soeren Sandmann Pedersen,
Pekka Paalanen
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
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] ftrace: fix setting of pos in read_pipe
2008-04-23 2:08 [PATCH] ftrace: fix setting of pos in read_pipe Steven Rostedt
@ 2008-04-23 9:52 ` Ingo Molnar
2008-04-23 12:06 ` Steven Rostedt
0 siblings, 1 reply; 3+ messages in thread
From: Ingo Molnar @ 2008-04-23 9:52 UTC (permalink / raw)
To: Steven Rostedt
Cc: LKML, Peter Zijlstra, akpm, Soeren Sandmann Pedersen,
Pekka Paalanen
* Steven Rostedt <rostedt@goodmis.org> wrote:
> 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.
applied - but what is missing from your changelog is effects of this
bug. When testers check lkml they might be interested in that
information. Is the result of this bug an incorrect trace_pipe output?
(double entries, or missed entries?)
Ingo
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] ftrace: fix setting of pos in read_pipe
2008-04-23 9:52 ` Ingo Molnar
@ 2008-04-23 12:06 ` Steven Rostedt
0 siblings, 0 replies; 3+ messages in thread
From: Steven Rostedt @ 2008-04-23 12:06 UTC (permalink / raw)
To: Ingo Molnar
Cc: LKML, Peter Zijlstra, akpm, Soeren Sandmann Pedersen,
Pekka Paalanen
On Wed, 23 Apr 2008, Ingo Molnar wrote:
> applied - but what is missing from your changelog is effects of this
> bug. When testers check lkml they might be interested in that
> information. Is the result of this bug an incorrect trace_pipe output?
> (double entries, or missed entries?)
Actually, I'm not really sure what the error would be. Could be double
entries or missing entries, or infinite output. I notice the bug via code
review not tests. I could run it with the buggy code and see what the
symptoms are.
-- Steve
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2008-04-23 12:06 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-04-23 2:08 [PATCH] ftrace: fix setting of pos in read_pipe Steven Rostedt
2008-04-23 9:52 ` Ingo Molnar
2008-04-23 12:06 ` Steven Rostedt
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox