WSL2-Linux-Kernel/drivers/tty
Peter Hurley 7fd6f640f2 serial: 8250_dw: Fix deadlock in LCR workaround
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-03-11 16:39:52 +01:00
..
hvc s390/hvc_iucv: add simple wildcard matches to the iucv allow filter 2015-01-22 12:16:56 +01:00
ipwireless
serial serial: 8250_dw: Fix deadlock in LCR workaround 2015-03-11 16:39:52 +01:00
vt vt: provide notifications on selection changes 2015-02-02 10:09:54 -08:00
Kconfig
Makefile
amiserial.c TTY: fix misspelling of current function in string 2015-01-09 14:38:15 -08:00
bfin_jtag_comm.c TTY: bfin_jtag_comm: remove incorrect wait_until_sent operation 2015-03-07 03:44:14 +01:00
cyclades.c
ehv_bytechan.c tty: remove unused variable sprop 2015-02-03 15:52:13 -08:00
goldfish.c
isicom.c tty/isicom: fix big-endian compile warning 2015-02-02 10:11:25 -08:00
metag_da.c
moxa.c
moxa.h
mxser.c
mxser.h
n_gsm.c
n_hdlc.c
n_r3964.c
n_tracerouter.c
n_tracesink.c
n_tracesink.h
n_tty.c n_tty: Fix signal handling flushes 2015-02-02 10:11:27 -08:00
nozomi.c
pty.c n_tty: Fix signal handling flushes 2015-02-02 10:11:27 -08:00
rocket.c TTY: fix misspelling of current function in string 2015-01-09 14:38:15 -08:00
rocket.h
rocket_int.h
synclink.c
synclink_gt.c
synclinkmp.c
sysrq.c oom, PM: make OOM detection in the freezer path raceless 2015-02-11 17:06:03 -08:00
tty_audit.c
tty_buffer.c pty: Fix buffer flush deadlock 2015-02-02 10:11:27 -08:00
tty_io.c tty: fix up atime/mtime mess, take four 2015-03-07 03:06:51 +01:00
tty_ioctl.c TTY: fix tty_wait_until_sent maximum timeout 2015-03-07 03:44:15 +01:00
tty_ldisc.c
tty_ldsem.c
tty_mutex.c tty: Make lock subclasses available for other tty locks 2015-02-02 10:11:27 -08:00
tty_port.c tty: Deletion of unnecessary checks before two function calls 2014-11-26 19:35:49 -08:00