aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--arch/x86/kernel/cpu/perf_counter.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/arch/x86/kernel/cpu/perf_counter.c b/arch/x86/kernel/cpu/perf_counter.c
index fc06f4d32644..d4c0cc9d3263 100644
--- a/arch/x86/kernel/cpu/perf_counter.c
+++ b/arch/x86/kernel/cpu/perf_counter.c
@@ -871,6 +871,9 @@ perf_counter_nmi_handler(struct notifier_block *self,
871 struct pt_regs *regs; 871 struct pt_regs *regs;
872 int ret; 872 int ret;
873 873
874 if (!atomic_read(&num_counters))
875 return NOTIFY_DONE;
876
874 switch (cmd) { 877 switch (cmd) {
875 case DIE_NMI: 878 case DIE_NMI:
876 case DIE_NMI_IPI: 879 case DIE_NMI_IPI: