ARM: 7356/1: perf: check that we have an event in the PMU IRQ handlers
authorWill Deacon <will.deacon@arm.com>
Tue, 6 Mar 2012 16:34:50 +0000 (17:34 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 12 Mar 2012 19:31:39 +0000 (12:31 -0700)
commit288733a6065034d1870b02b164da0fb2d8452178
treec3e47649068e0ef4356e3c7886dd5e1b2bd91777
parent075964ad4370162964f41ba1136b8581ab1a302a
ARM: 7356/1: perf: check that we have an event in the PMU IRQ handlers

commit f6f5a30c834135c9f2fa10400c59ebbdd9188567 upstream.

The PMU IRQ handlers in perf assume that if a counter has overflowed
then perf must be responsible. In the paranoid world of crazy hardware,
this could be false, so check that we do have a valid event before
attempting to dereference NULL in the interrupt path.

Signed-off-by: Ming Lei <tom.leiming@gmail.com>
Signed-off-by: Will Deacon <will.deacon@arm.com>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
arch/arm/kernel/perf_event_v6.c
arch/arm/kernel/perf_event_v7.c
arch/arm/kernel/perf_event_xscale.c