summaryrefslogtreecommitdiffstats
path: root/arch
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2014-03-02 11:37:07 -0600
committerLinus Torvalds <torvalds@linux-foundation.org>2014-03-02 11:37:07 -0600
commit3154da34beff952a6b29dcc27c9dacf9adac977c (patch)
tree9bb7133d2e429611761d63b6b7dc52e3e59fc5df /arch
parent55de1ed2f597646c6c7f0bbe2da1680c760b0d40 (diff)
parentaf76815a31adc75dd9526230affdd678e65ac59f (diff)
downloadlinux-stable-3154da34beff952a6b29dcc27c9dacf9adac977c.tar.gz
linux-stable-3154da34beff952a6b29dcc27c9dacf9adac977c.tar.bz2
linux-stable-3154da34beff952a6b29dcc27c9dacf9adac977c.zip
Merge branch 'perf-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip
Pull perf fixes from Ingo Molnar: "Misc fixes, most of them on the tooling side" * 'perf-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: perf tools: Fix strict alias issue for find_first_bit perf tools: fix BFD detection on opensuse perf: Fix hotplug splat perf/x86: Fix event scheduling perf symbols: Destroy unused symsrcs perf annotate: Check availability of annotate when processing samples
Diffstat (limited to 'arch')
-rw-r--r--arch/x86/kernel/cpu/perf_event.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/arch/x86/kernel/cpu/perf_event.c b/arch/x86/kernel/cpu/perf_event.c
index 895604f2e916..79f9f848bee4 100644
--- a/arch/x86/kernel/cpu/perf_event.c
+++ b/arch/x86/kernel/cpu/perf_event.c
@@ -1192,6 +1192,9 @@ static void x86_pmu_del(struct perf_event *event, int flags)
for (i = 0; i < cpuc->n_events; i++) {
if (event == cpuc->event_list[i]) {
+ if (i >= cpuc->n_events - cpuc->n_added)
+ --cpuc->n_added;
+
if (x86_pmu.put_event_constraints)
x86_pmu.put_event_constraints(cpuc, event);