]> xenbits.xensource.com Git - xen.git/commitdiff
watchdog/crash: Always disable watchdog in console_force_unlock()
authorAndrew Cooper <andrew.cooper3@citrix.com>
Fri, 27 Sep 2013 09:54:42 +0000 (11:54 +0200)
committerJan Beulich <jbeulich@suse.com>
Fri, 27 Sep 2013 09:54:42 +0000 (11:54 +0200)
Depending on the state of the conring and serial_tx_buffer,
console_force_unlock() can be a long running operation, usually because of
serial_start_sync()

XenServer testing has found a reliable case where console_force_unlock() on
one PCPU takes long enough for another PCPU to timeout due to the watchdog
(such as waiting for a tlb flush callin).

The watchdog timeout causes the second PCPU to repeat the
console_force_unlock(), at which point the first PCPU typically fails an
assertion in spin_unlock_irqrestore(&port->tx_lock) (because the tx_lock has
been unlocked behind itself).

console_force_unlock() is only on emergency paths, so one way or another the
host is going down.  Disable the watchdog before forcing the console lock to
help prevent having pcpus completing with each other to bring the host down.

Signed-off-by: Andrew Cooper <andrew.cooper3@citrix.com>
Acked-by: Keir Fraser <keir@xen.org>
master commit: 7b9fa702ca323164d6b49e8b639a57f880454a8c
master date: 2013-08-13 14:31:01 +0200

xen/arch/x86/x86_64/traps.c
xen/drivers/char/console.c

index bcd760908e8c2855eb16cbda3f85f3859839aa3e..105448014541357cdeeffb383163852fd88aee0e 100644 (file)
@@ -226,8 +226,6 @@ void do_double_fault(struct cpu_user_regs *regs)
     unsigned int cpu;
     unsigned long crs[8];
 
-    watchdog_disable();
-
     console_force_unlock();
 
     asm ( "lsll %1, %0" : "=r" (cpu) : "rm" (PER_CPU_GDT_ENTRY << 3) );
index bf16d4956e081e5838e8beb2b746ddf4891df035..110addcfc2489ba3b514ee40fee5cee9fd6b6bdb 100644 (file)
@@ -736,6 +736,9 @@ void console_end_log_everything(void)
 
 void console_force_unlock(void)
 {
+#ifdef CONFIG_X86
+    watchdog_disable();
+#endif
     spin_lock_init(&console_lock);
     serial_force_unlock(sercon_handle);
     console_locks_busted = 1;