All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] Keep index within event_type_descriptors[]
@ 2009-07-13  0:25 Roel Kluin
  2009-07-13  9:01 ` [tip:perfcounters/urgent] perf_counter tools: Fix index boundary check tip-bot for Roel Kluin
  0 siblings, 1 reply; 2+ messages in thread
From: Roel Kluin @ 2009-07-13  0:25 UTC (permalink / raw)
  To: Ingo Molnar, LKML, Andrew Morton

Keep index within event_type_descriptors[]

Signed-off-by: Roel Kluin <roel.kluin@gmail.com>
---
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)

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

* [tip:perfcounters/urgent] perf_counter tools: Fix index boundary check
  2009-07-13  0:25 [PATCH] Keep index within event_type_descriptors[] Roel Kluin
@ 2009-07-13  9:01 ` tip-bot for Roel Kluin
  0 siblings, 0 replies; 2+ messages in thread
From: tip-bot for Roel Kluin @ 2009-07-13  9:01 UTC (permalink / raw)
  To: linux-tip-commits
  Cc: linux-kernel, acme, paulus, hpa, mingo, a.p.zijlstra, efault,
	fweisbec, akpm, roel.kluin, tglx, mingo

Commit-ID:  23cdb5d5171d591ec911aada682e09d53c14a810
Gitweb:     http://git.kernel.org/tip/23cdb5d5171d591ec911aada682e09d53c14a810
Author:     Roel Kluin <roel.kluin@gmail.com>
AuthorDate: Mon, 13 Jul 2009 02:25:47 +0200
Committer:  Ingo Molnar <mingo@elte.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@gmail.com>
Cc: Andrew Morton <akpm@linux-foundation.org>
Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
Cc: Mike Galbraith <efault@gmx.de>
Cc: Paul Mackerras <paulus@samba.org>
Cc: Arnaldo Carvalho de Melo <acme@redhat.com>
Cc: Frederic Weisbecker <fweisbec@gmail.com>
LKML-Reference: <4A5A7F0B.4070106@gmail.com>
Signed-off-by: Ingo Molnar <mingo@elte.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)

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

end of thread, other threads:[~2009-07-13  9:02 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-07-13  0:25 [PATCH] Keep index within event_type_descriptors[] Roel Kluin
2009-07-13  9:01 ` [tip:perfcounters/urgent] perf_counter tools: Fix index boundary check tip-bot for Roel Kluin

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.