[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <495E2987.3070501@gmail.com>
Date: Fri, 02 Jan 2009 15:49:43 +0100
From: Roel Kluin <roel.kluin@...il.com>
To: Steven Rostedt <rostedt@...dmis.org>
CC: lkml <linux-kernel@...r.kernel.org>
Subject: [PATCH] ftrace: unsigned idx cannot be less than 0
// vi kernel/trace/ftrace.c +787
struct ftrace_iterator {
...
unsigned idx;
...
};
idx is unsigned and cannot be less than 0.
Signed-off-by: Roel Kluin <roel.kluin@...il.com>
---
diff --git a/kernel/trace/ftrace.c b/kernel/trace/ftrace.c
index 2f32969..a344add 100644
--- a/kernel/trace/ftrace.c
+++ b/kernel/trace/ftrace.c
@@ -842,7 +842,7 @@ static void *t_start(struct seq_file *m, loff_t *pos)
void *p = NULL;
if (*pos > 0) {
- if (iter->idx < 0)
+ if (iter->idx == 0)
return p;
(*pos)--;
iter->idx--;
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists