[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <tip-23cdb5d5171d591ec911aada682e09d53c14a810@git.kernel.org>
Date: Mon, 13 Jul 2009 09:01:19 GMT
From: tip-bot for Roel Kluin <roel.kluin@...il.com>
To: linux-tip-commits@...r.kernel.org
Cc: linux-kernel@...r.kernel.org, acme@...hat.com, paulus@...ba.org,
hpa@...or.com, mingo@...hat.com, a.p.zijlstra@...llo.nl,
efault@....de, fweisbec@...il.com, akpm@...ux-foundation.org,
roel.kluin@...il.com, tglx@...utronix.de, mingo@...e.hu
Subject: [tip:perfcounters/urgent] perf_counter tools: Fix index boundary check
Commit-ID: 23cdb5d5171d591ec911aada682e09d53c14a810
Gitweb: http://git.kernel.org/tip/23cdb5d5171d591ec911aada682e09d53c14a810
Author: Roel Kluin <roel.kluin@...il.com>
AuthorDate: Mon, 13 Jul 2009 02:25:47 +0200
Committer: Ingo Molnar <mingo@...e.hu>
CommitDate: Mon, 13 Jul 2009 10:58:28 +0200
perf_counter tools: Fix index boundary check
Keep index within event_type_descriptors[]
Signed-off-by: Roel Kluin <roel.kluin@...il.com>
Cc: Andrew Morton <akpm@...ux-foundation.org>
Cc: Peter Zijlstra <a.p.zijlstra@...llo.nl>
Cc: Mike Galbraith <efault@....de>
Cc: Paul Mackerras <paulus@...ba.org>
Cc: Arnaldo Carvalho de Melo <acme@...hat.com>
Cc: Frederic Weisbecker <fweisbec@...il.com>
LKML-Reference: <4A5A7F0B.4070106@...il.com>
Signed-off-by: Ingo Molnar <mingo@...e.hu>
---
tools/perf/util/parse-events.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/tools/perf/util/parse-events.c b/tools/perf/util/parse-events.c
index 518a33a..d18c98e 100644
--- a/tools/perf/util/parse-events.c
+++ b/tools/perf/util/parse-events.c
@@ -436,7 +436,7 @@ void print_events(void)
for (i = 0; i < ARRAY_SIZE(event_symbols); i++, syms++) {
type = syms->type + 1;
- if (type > ARRAY_SIZE(event_type_descriptors))
+ if (type >= ARRAY_SIZE(event_type_descriptors))
type = 0;
if (type != prev_type)
--
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