Skip to contentSkip to conversation

tty: serial: 8250: don't take the trylock during oops

PATCH New Sebastian Andrzej Siewior 1 participant 1 message Apr 12, 2016 TTY layer and serial drivers

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 tty: serial: 8250: don't take the trylock during oops

An oops with irqs off (panic() from irqsafe hrtimer like the watchdog timer) will lead to a lockdep warning on each invocation and as such never completes.
Therefore we skip the trylock in the oops case.

---
 drivers/tty/serial/8250/8250_port.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/tty/serial/8250/8250_port.c +2 -2
index 5568d70eee0c..138b1b985063 100644
@@ -2850,9 +2850,9 @@ void serial8250_console_write(struct uart_8250_port *up, const char *s,
 
 	serial8250_rpm_get(up);
 
-	if (port->sysrq)
+	if (port->sysrq || oops_in_progress)
 		locked = 0;
-	else if (oops_in_progress || in_kdb_printk())
+	else if (in_kdb_printk())
 		locked = spin_trylock_irqsave(&port->lock, flags);
 	else
 		spin_lock_irqsave(&port->lock, flags);
Signature · 1 line
2.8.0.rc3