2020-02-21 18:07:43 +00:00
|
|
|
From 8ed21eef043e64b2df5e6fc12408c07e22278278 Mon Sep 17 00:00:00 2001
|
2018-08-27 14:32:32 +00:00
|
|
|
From: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
|
|
|
|
Date: Mon, 11 Apr 2016 16:55:02 +0200
|
2020-02-21 18:07:43 +00:00
|
|
|
Subject: [PATCH 169/319] tty: serial: 8250: don't take the trylock during oops
|
|
|
|
Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.19/older/patches-4.19.103-rt42.tar.xz
|
2018-08-27 14:32:32 +00:00
|
|
|
|
|
|
|
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.
|
|
|
|
|
|
|
|
Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
|
|
|
|
---
|
2019-04-08 23:49:20 +00:00
|
|
|
drivers/tty/serial/8250/8250_port.c | 4 +---
|
2018-08-27 14:32:32 +00:00
|
|
|
1 file changed, 1 insertion(+), 3 deletions(-)
|
|
|
|
|
2019-04-08 23:49:20 +00:00
|
|
|
diff --git a/drivers/tty/serial/8250/8250_port.c b/drivers/tty/serial/8250/8250_port.c
|
2019-11-25 00:04:39 +00:00
|
|
|
index aa4de6907f77..6b1d46c1df3b 100644
|
2018-08-27 14:32:32 +00:00
|
|
|
--- a/drivers/tty/serial/8250/8250_port.c
|
|
|
|
+++ b/drivers/tty/serial/8250/8250_port.c
|
2019-11-25 00:04:39 +00:00
|
|
|
@@ -3239,10 +3239,8 @@ void serial8250_console_write(struct uart_8250_port *up, const char *s,
|
2018-08-27 14:32:32 +00:00
|
|
|
|
|
|
|
serial8250_rpm_get(up);
|
|
|
|
|
|
|
|
- if (port->sysrq)
|
|
|
|
+ if (port->sysrq || oops_in_progress)
|
|
|
|
locked = 0;
|
|
|
|
- else if (oops_in_progress)
|
|
|
|
- locked = spin_trylock_irqsave(&port->lock, flags);
|
|
|
|
else
|
|
|
|
spin_lock_irqsave(&port->lock, flags);
|
|
|
|
|
2020-01-03 23:36:11 +00:00
|
|
|
--
|
2020-02-21 18:07:43 +00:00
|
|
|
2.25.0
|
2020-01-03 23:36:11 +00:00
|
|
|
|