Skip to contentSkip to conversation

x86/mce: don't restart timer if disabled

PATCH New Hidetoshi Seto 1 participant 1 message Dec 3, 2009 x86

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 x86/mce: don't restart timer if disabled

Even it is in error path unlikely taken, add_timer_on() at CPU_DOWN_FAILED* needs to be skipped if mce_timer is disabled.

---
 arch/x86/kernel/cpu/mcheck/mce.c |    6 ++++--
 1 files changed, 4 insertions(+), 2 deletions(-)
arch/x86/kernel/cpu/mcheck/mce.c +4 -2
index a06b4fe..c756e13 100644
@@ -1997,9 +1997,11 @@ mce_cpu_callback(struct notifier_block *nfb, unsigned long action, void *hcpu)
 		break;
 	case CPU_DOWN_FAILED:
 	case CPU_DOWN_FAILED_FROZEN:
-		t->expires = round_jiffies(jiffies +
+		if (!mce_ignore_ce && check_interval) {
+			t->expires = round_jiffies(jiffies +
 					   __get_cpu_var(mce_next_interval));
-		add_timer_on(t, cpu);
+			add_timer_on(t, cpu);
+		}
 		smp_call_function_single(cpu, mce_reenable_cpu, &action, 1);
 		break;
 	case CPU_POST_DEAD:
Signature · 1 line
1.6.5.3