linux-uconsole/drivers/tty
Peter Hurley e3f5ff371c serial: 8250_dw: Fix deadlock in LCR workaround
commit 7fd6f640f2 upstream.

Trying to write console output from within the serial console driver
while the port->lock is held causes recursive deadlock:

  CPU 0
spin_lock_irqsave(&port->lock)
printk()
  console_unlock()
    call_console_drivers()
      serial8250_console_write()
        spin_lock_irqsave(&port->lock)
** DEADLOCK **

The 8250_dw i/o accessors try to write a console error message if the
LCR workaround was unsuccessful. When the port->lock is already held
(eg., when called from serial8250_set_termios()), this deadlocks.

Make the error message a FIXME until a general solution is devised.

Cc: Tim Kryger <tim.kryger@gmail.com>
Reported-by: Zhang Zhen <zhenzhang.zhang@huawei.com>
Signed-off-by: Peter Hurley <peter@hurleysoftware.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-04-29 10:33:57 +02:00
..
hvc drivers/tty/hvc: don't free hvc_console_setup after init 2014-05-13 13:59:40 +02:00
ipwireless
serial serial: 8250_dw: Fix deadlock in LCR workaround 2015-04-29 10:33:57 +02:00
vt vt: provide notifications on selection changes 2015-03-06 14:40:51 -08:00
amiserial.c
bfin_jtag_comm.c
cyclades.c
ehv_bytechan.c
goldfish.c
isicom.c
Kconfig
Makefile
metag_da.c
moxa.c
moxa.h
mxser.c
mxser.h
n_gsm.c tty: n_gsm: Fix for modems with brk in modem status control 2014-02-22 12:41:27 -08:00
n_hdlc.c
n_r3964.c
n_tracerouter.c
n_tracesink.c
n_tracesink.h
n_tty.c n_tty: Fix n_tty_write crash when echoing in raw mode 2014-05-13 13:59:40 +02:00
nozomi.c
pty.c tty: Prevent untrappable signals from malicious program 2015-03-06 14:40:51 -08:00
rocket.c
rocket.h
rocket_int.h
synclink.c
synclink_gt.c
synclinkmp.c
sysrq.c
tty_audit.c
tty_buffer.c
tty_io.c tty: fix up atime/mtime mess, take four 2015-03-18 13:22:33 +01:00
tty_ioctl.c TTY: fix tty_wait_until_sent on 64-bit machines 2015-03-18 13:22:31 +01:00
tty_ldisc.c
tty_mutex.c
tty_port.c