]> git.baikalelectronics.ru Git - kernel.git/commit
drivers/perf: arm_pmu: Fix NULL pointer dereference during probe
authorStefan Wahren <stefan.wahren@i2se.com>
Sat, 27 Aug 2016 16:19:50 +0000 (16:19 +0000)
committerCatalin Marinas <catalin.marinas@arm.com>
Fri, 2 Sep 2016 16:17:52 +0000 (17:17 +0100)
commit1e9694ac904abc127efe1bb521fcb5b67feb1226
tree6f711796620e53c304f02123168491060284de11
parent924586f58fee0fa48b84ba663fa2f1fef675cd4c
drivers/perf: arm_pmu: Fix NULL pointer dereference during probe

Patch c16df72f7f87 ("drivers/perf: arm-pmu: Fix handling of SPI lacking
interrupt-affinity property") unintended also fixes perf_event support
for bcm2835 which doesn't have PMU interrupts. Unfortunately this change
introduce a NULL pointer dereference on bcm2835, because irq_is_percpu
always expected to be called with a valid IRQ. So fix this regression
by validating the IRQ before.

Tested-by: Kevin Hilman <khilman@baylibre.com>
Signed-off-by: Stefan Wahren <stefan.wahren@i2se.com>
Fixes: c16df72f7f87 ("drivers/perf: arm-pmu: Fix handling of SPI lacking "interrupt-affinity" property")
Signed-off-by: Will Deacon <will.deacon@arm.com>
Signed-off-by: Catalin Marinas <catalin.marinas@arm.com>
drivers/perf/arm_pmu.c