]> git.karo-electronics.de Git - mv-sheeva.git/commit
perf event: Prevent unbound event__name array access
authorThomas Gleixner <tglx@linutronix.de>
Tue, 7 Dec 2010 12:48:42 +0000 (12:48 +0000)
committerArnaldo Carvalho de Melo <acme@redhat.com>
Thu, 9 Dec 2010 13:15:07 +0000 (11:15 -0200)
commit3835bc00c5b2d8e337a6e9d7b44f47e02760dba3
treec93ec68b81e3c44c0d6e42d9e2bdeebf38657205
parentb226a5a72901bc9c73d639ea2e53e6c304bf3b74
perf event: Prevent unbound event__name array access

event__name[] is missing an entry for PERF_RECORD_FINISHED_ROUND, but we
happily access the array from the dump code.

Make event__name[] static and provide an accessor function, fix up all
callers and add the missing string.

Cc: Frederic Weisbecker <fweisbec@gmail.com>
Cc: Ian Munsie <imunsie@au1.ibm.com>
Cc: Ingo Molnar <mingo@elte.hu>
Cc: Peter Zijlstra <peterz@infradead.org>
LKML-Reference: <20101207124550.432593943@linutronix.de>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
tools/perf/util/event.c
tools/perf/util/event.h
tools/perf/util/hist.c
tools/perf/util/session.c