diff options
author | Suravee Suthikulpanit <suravee.suthikulpanit@amd.com> | 2010-01-18 11:25:36 -0600 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@suse.de> | 2010-02-09 04:50:57 -0800 |
commit | 42f7e233e4afae9d327f24c73379920adc905f95 (patch) | |
tree | 32eee07fc2f5cbec864c31c7d574113db4545ec4 | |
parent | 9c66557324ea4879abe8c9dde769a0061c81e1ac (diff) | |
download | kernel-common-42f7e233e4afae9d327f24c73379920adc905f95.tar.gz kernel-common-42f7e233e4afae9d327f24c73379920adc905f95.tar.bz2 kernel-common-42f7e233e4afae9d327f24c73379920adc905f95.zip |
oprofile/x86: fix crash when profiling more than 28 events
commit d8cc108f4fab42b380c6b3f3356f99e8dd5372e2 upstream.
With multiplexing enabled oprofile crashs when profiling more than 28
events. This patch fixes this.
Signed-off-by: Suravee Suthikulpanit <suravee.suthikulpanit@amd.com>
Signed-off-by: Robert Richter <robert.richter@amd.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
-rw-r--r-- | arch/x86/oprofile/nmi_int.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/arch/x86/oprofile/nmi_int.c b/arch/x86/oprofile/nmi_int.c index 5a14cd578cc4..3347f696edc7 100644 --- a/arch/x86/oprofile/nmi_int.c +++ b/arch/x86/oprofile/nmi_int.c @@ -222,7 +222,7 @@ static void nmi_cpu_switch(void *dummy) /* move to next set */ si += model->num_counters; - if ((si > model->num_virt_counters) || (counter_config[si].count == 0)) + if ((si >= model->num_virt_counters) || (counter_config[si].count == 0)) per_cpu(switch_index, cpu) = 0; else per_cpu(switch_index, cpu) = si; |