diff options
author | Steven Rostedt <srostedt@redhat.com> | 2009-01-06 12:43:01 -0500 |
---|---|---|
committer | Ingo Molnar <mingo@elte.hu> | 2009-01-07 04:43:52 -0500 |
commit | 431aa3fbf5bbe3be79809c7e603c2ed2ac64b015 (patch) | |
tree | a61e6a869388ab58b02bf2f0ac6931c5932fe675 /kernel/trace | |
parent | 99793e3dbe39a50d871eedc361659a894601e2bf (diff) |
ftrace: convert unsigned index to signed
Impact: fix to unsigned compared to less than zero
Roel Kluin pointed out that there is a compare of an unsigned number
to less than zero. A previous clean up had the unsigned index set
to -1 for certain cases, but never converted it to signed.
Frederic Weisbecker noticed that another index is used to compare
the above index to and it also needs to be converted to signed.
[
Converted ftrace_page->index to int from unsigned long as
Andrew Morton pointed out that there's no need for it to
stay a long.
]
Reported-by: Roel Kluin <roel.kluin@gmail.com>
Reported-by: Frederic Weisbecker <fweisbec@gmail.com>
Signed-off-by: Steven Rostedt <srostedt@redhat.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Diffstat (limited to 'kernel/trace')
-rw-r--r-- | kernel/trace/ftrace.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/kernel/trace/ftrace.c b/kernel/trace/ftrace.c index 2f32969c09df..9e54a6ccdb93 100644 --- a/kernel/trace/ftrace.c +++ b/kernel/trace/ftrace.c | |||
@@ -289,7 +289,7 @@ static DEFINE_MUTEX(ftrace_regex_lock); | |||
289 | 289 | ||
290 | struct ftrace_page { | 290 | struct ftrace_page { |
291 | struct ftrace_page *next; | 291 | struct ftrace_page *next; |
292 | unsigned long index; | 292 | int index; |
293 | struct dyn_ftrace records[]; | 293 | struct dyn_ftrace records[]; |
294 | }; | 294 | }; |
295 | 295 | ||
@@ -786,7 +786,7 @@ enum { | |||
786 | 786 | ||
787 | struct ftrace_iterator { | 787 | struct ftrace_iterator { |
788 | struct ftrace_page *pg; | 788 | struct ftrace_page *pg; |
789 | unsigned idx; | 789 | int idx; |
790 | unsigned flags; | 790 | unsigned flags; |
791 | unsigned char buffer[FTRACE_BUFF_MAX+1]; | 791 | unsigned char buffer[FTRACE_BUFF_MAX+1]; |
792 | unsigned buffer_idx; | 792 | unsigned buffer_idx; |