From: Roel Kluin <roel.kluin@gmail.com>
To: Steven Rostedt <rostedt@goodmis.org>
Cc: lkml <linux-kernel@vger.kernel.org>
Subject: [PATCH] ftrace: unsigned idx cannot be less than 0
Date: Fri, 02 Jan 2009 15:49:43 +0100 [thread overview]
Message-ID: <495E2987.3070501@gmail.com> (raw)
// 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@gmail.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--;
next reply other threads:[~2009-01-02 14:49 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-01-02 14:49 Roel Kluin [this message]
2009-01-02 15:48 ` [PATCH] ftrace: unsigned idx cannot be less than 0 Frederic Weisbecker
2009-01-02 19:20 ` Roel Kluin
2009-01-02 21:11 ` Frederic Weisbecker
2009-01-03 15:55 ` [PATCH v2] " Roel Kluin
2009-01-06 15:49 ` [PATCH] " Steven Rostedt
2009-01-06 15:58 ` Frédéric Weisbecker
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=495E2987.3070501@gmail.com \
--to=roel.kluin@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=rostedt@goodmis.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox