summaryrefslogtreecommitdiffstats
path: root/debian/patches-rt/0168-tty-serial-8250-don-t-take-the-trylock-during-oops.patch
blob: 2a649311b869945e68b5f8059003f44544ac161f (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
From: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
Date: Mon, 11 Apr 2016 16:55:02 +0200
Subject: [PATCH 168/353] tty: serial: 8250: don't take the trylock during oops
Origin: https://git.kernel.org/cgit/linux/kernel/git/rt/linux-stable-rt.git/commit?id=fedac9e5838862f2a77d0d8a34b4b0bffca76c83

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>
---
 drivers/tty/serial/8250/8250_port.c | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/drivers/tty/serial/8250/8250_port.c b/drivers/tty/serial/8250/8250_port.c
index cba4888bc482..af7df5ca17a5 100644
--- a/drivers/tty/serial/8250/8250_port.c
+++ b/drivers/tty/serial/8250/8250_port.c
@@ -3316,10 +3316,8 @@ 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)
-		locked = spin_trylock_irqsave(&port->lock, flags);
 	else
 		spin_lock_irqsave(&port->lock, flags);