All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH][GIT PULL] tracing: Fix warning in s_next of trace file ops
@ 2010-03-03 16:16 Steven Rostedt
  2010-03-04 10:53 ` Ingo Molnar
  0 siblings, 1 reply; 2+ messages in thread
From: Steven Rostedt @ 2010-03-03 16:16 UTC (permalink / raw)
  To: LKML; +Cc: Ingo Molnar, stable, Lai Jiangshan, Andrew Morton


Ingo,

Please pull the latest tip/tracing/urgent tree, which can be found at:

  git://git.kernel.org/pub/scm/linux/kernel/git/rostedt/linux-2.6-trace.git
tip/tracing/urgent


Lai Jiangshan (1):
      tracing: Fix warning in s_next of trace file ops

----
 kernel/trace/trace.c |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)
---------------------------
commit ac91d85456372a90af5b85eb6620fd2efb1e431b
Author: Lai Jiangshan <laijs@cn.fujitsu.com>
Date:   Tue Mar 2 17:54:50 2010 +0800

    tracing: Fix warning in s_next of trace file ops
    
    This warning in s_next() can be triggered by lseek():
     [<c018b3f7>] ? s_next+0x77/0x80
     [<c013e3c1>] warn_slowpath_common+0x81/0xa0
     [<c018b3f7>] ? s_next+0x77/0x80
     [<c013e3fa>] warn_slowpath_null+0x1a/0x20
     [<c018b3f7>] s_next+0x77/0x80
     [<c01efa77>] traverse+0x117/0x200
     [<c01eff13>] seq_lseek+0xa3/0x120
     [<c01efe70>] ? seq_lseek+0x0/0x120
     [<c01d7081>] vfs_llseek+0x41/0x50
     [<c01d8116>] sys_llseek+0x66/0xa0
     [<c0102bd0>] sysenter_do_call+0x12/0x26
    
    The iterator "leftover" variable is zeroed in the opening of the trace
    file. But lseek can call s_start() which will call s_next() without
    reseting the "leftover" variable back to zero, which might trigger
    the WARN_ON_ONCE(iter->leftover) that is in s_next().
    
    Cc: stable@kernel.org
    Signed-off-by: Lai Jiangshan <laijs@cn.fujitsu.com>
    LKML-Reference: <4B8CE06A.9090207@cn.fujitsu.com>
    Signed-off-by: Steven Rostedt <rostedt@goodmis.org>

diff --git a/kernel/trace/trace.c b/kernel/trace/trace.c
index 032c57c..5edf410 100644
--- a/kernel/trace/trace.c
+++ b/kernel/trace/trace.c
@@ -1703,6 +1703,7 @@ static void *s_start(struct seq_file *m, loff_t *pos)
 
 		ftrace_enable_cpu();
 
+		iter->leftover = 0;
 		for (p = iter; p && l < *pos; p = s_next(m, p, &l))
 			;
 



^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH][GIT PULL] tracing: Fix warning in s_next of trace file ops
  2010-03-03 16:16 [PATCH][GIT PULL] tracing: Fix warning in s_next of trace file ops Steven Rostedt
@ 2010-03-04 10:53 ` Ingo Molnar
  0 siblings, 0 replies; 2+ messages in thread
From: Ingo Molnar @ 2010-03-04 10:53 UTC (permalink / raw)
  To: Steven Rostedt
  Cc: LKML, stable, Lai Jiangshan, Andrew Morton, Fr??d??ric Weisbecker


* Steven Rostedt <rostedt@goodmis.org> wrote:

> 
> Ingo,
> 
> Please pull the latest tip/tracing/urgent tree, which can be found at:
> 
>   git://git.kernel.org/pub/scm/linux/kernel/git/rostedt/linux-2.6-trace.git
> tip/tracing/urgent
> 
> 
> Lai Jiangshan (1):
>       tracing: Fix warning in s_next of trace file ops
> 
> ----
>  kernel/trace/trace.c |    1 +
>  1 files changed, 1 insertions(+), 0 deletions(-)

Pulled, thanks Steve!

	Ingo

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2010-03-04 18:09 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-03-03 16:16 [PATCH][GIT PULL] tracing: Fix warning in s_next of trace file ops Steven Rostedt
2010-03-04 10:53 ` Ingo Molnar

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.