Skip to content

Commit

Permalink
oprofile/x86: fix crash when profiling more than 28 events
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Suravee Suthikulpanit authored and Robert Richter committed Jan 25, 2010
1 parent 92dcffb commit d8cc108
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion arch/x86/oprofile/nmi_int.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit d8cc108

Please sign in to comment.