1 From 27f3814ce183a4235bb5fbbbf3f06b4a33ec0056 Mon Sep 17 00:00:00 2001
2 From: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
3 Date: Mon, 11 Apr 2016 16:55:02 +0200
4 Subject: [PATCH 338/366] tty: serial: 8250: don't take the trylock during oops
6 An oops with irqs off (panic() from irqsafe hrtimer like the watchdog
7 timer) will lead to a lockdep warning on each invocation and as such
9 Therefore we skip the trylock in the oops case.
11 Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
13 drivers/tty/serial/8250/8250_port.c | 4 ++--
14 1 file changed, 2 insertions(+), 2 deletions(-)
16 diff --git a/drivers/tty/serial/8250/8250_port.c b/drivers/tty/serial/8250/8250_port.c
17 index 91b831a1..a0b9e85 100644
18 --- a/drivers/tty/serial/8250/8250_port.c
19 +++ b/drivers/tty/serial/8250/8250_port.c
20 @@ -2844,9 +2844,9 @@ void serial8250_console_write(struct uart_8250_port *up, const char *s,
22 serial8250_rpm_get(up);
25 + if (port->sysrq || oops_in_progress)
27 - else if (oops_in_progress || in_kdb_printk())
28 + else if (in_kdb_printk())
29 locked = spin_trylock_irqsave(&port->lock, flags);
31 spin_lock_irqsave(&port->lock, flags);