mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH] oprofile/x86: fix crash when profiling more than 28 events
@ 2010-01-25 18:26 Robert Richter
  0 siblings, 0 replies; only message in thread
From: Robert Richter @ 2010-01-25 18:26 UTC (permalink / raw)
  To: Ingo Molnar; +Cc: LKML, oprofile-list, Suravee Suthikulpanit, Robert Richter

From: Suravee Suthikulpanit <suravee.suthikulpanit@amd.com>

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>
---
 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 cb88b1a..76d4f56 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;
-- 
1.6.6



^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2010-01-25 19:22 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-01-25 18:26 [PATCH] oprofile/x86: fix crash when profiling more than 28 events Robert Richter

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®