Messages in this thread Patch in this message | | | Date | Fri, 01 May 2009 12:23:17 +0200 | From | Peter Zijlstra <> | Subject | [PATCH 2/4] perf_counter: fix nmi-watchdog interaction |
| |
When we don't have any perf-counters active, don't act like we know what the NMI is for.
Signed-off-by: Peter Zijlstra <a.p.zijlstra@chello.nl> --- arch/x86/kernel/cpu/perf_counter.c | 3 +++ 1 file changed, 3 insertions(+)
Index: linux-2.6/arch/x86/kernel/cpu/perf_counter.c =================================================================== --- linux-2.6.orig/arch/x86/kernel/cpu/perf_counter.c +++ linux-2.6/arch/x86/kernel/cpu/perf_counter.c @@ -891,6 +891,9 @@ perf_counter_nmi_handler(struct notifier struct pt_regs *regs; int ret; + if (!atomic_read(&num_counters)) + return NOTIFY_DONE; + switch (cmd) { case DIE_NMI: case DIE_NMI_IPI: --
| |