diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2013-08-16 16:52:29 -0700 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2013-08-16 16:52:29 -0700 |
commit | 2620bf06f168527e8d5159d6c21ea80e60b663fd (patch) | |
tree | 0ce69c6150ac8e5fd929cfc6cd34d2b4ad1cabc1 /arch/arm/kernel/perf_event.c | |
parent | 359d16ca1bd6adcd9f031da35d807f9c37ec6a6e (diff) | |
parent | 2a2822475d0e734adffab72644329d9c042ce2e1 (diff) | |
download | kernel_replicant_linux-2620bf06f168527e8d5159d6c21ea80e60b663fd.tar.gz kernel_replicant_linux-2620bf06f168527e8d5159d6c21ea80e60b663fd.tar.bz2 kernel_replicant_linux-2620bf06f168527e8d5159d6c21ea80e60b663fd.zip |
Merge branch 'fixes' of git://git.linaro.org/people/rmk/linux-arm
Pull ARM fixes from Russell King:
"The usual collection of random fixes. Also some further fixes to the
last set of security fixes, and some more from Will (which you may
already have in a slightly different form)"
* 'fixes' of git://git.linaro.org/people/rmk/linux-arm:
ARM: 7807/1: kexec: validate CPU hotplug support
ARM: 7812/1: rwlocks: retry trylock operation if strex fails on free lock
ARM: 7811/1: locks: use early clobber in arch_spin_trylock
ARM: 7810/1: perf: Fix array out of bounds access in armpmu_map_hw_event()
ARM: 7809/1: perf: fix event validation for software group leaders
ARM: Fix FIQ code on VIVT CPUs
ARM: Fix !kuser helpers case
ARM: Fix the world famous typo with is_gate_vma()
Diffstat (limited to 'arch/arm/kernel/perf_event.c')
-rw-r--r-- | arch/arm/kernel/perf_event.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/arch/arm/kernel/perf_event.c b/arch/arm/kernel/perf_event.c index 21f77906602c..e186ee1e63f6 100644 --- a/arch/arm/kernel/perf_event.c +++ b/arch/arm/kernel/perf_event.c @@ -56,7 +56,7 @@ armpmu_map_hw_event(const unsigned (*event_map)[PERF_COUNT_HW_MAX], u64 config) int mapping; if (config >= PERF_COUNT_HW_MAX) - return -ENOENT; + return -EINVAL; mapping = (*event_map)[config]; return mapping == HW_OP_UNSUPPORTED ? -ENOENT : mapping; @@ -258,6 +258,9 @@ validate_event(struct pmu_hw_events *hw_events, struct arm_pmu *armpmu = to_arm_pmu(event->pmu); struct pmu *leader_pmu = event->group_leader->pmu; + if (is_software_event(event)) + return 1; + if (event->pmu != leader_pmu || event->state < PERF_EVENT_STATE_OFF) return 1; |