linux/drivers/tty/serial/8250
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
..
8250_accent.c
8250_acorn.c tty: remove use of __devexit 2012-11-21 15:27:46 -08:00
8250_boca.c
8250_core.c serial: 8250: Revert "tty: serial: 8250_core: read only RX if there is something in the FIFO" 2015-03-07 03:06:51 +01:00
8250_dma.c serial: 8250_dma: don't bother DMA with small transfers 2015-02-02 10:11:26 -08:00
8250_dw.c serial: 8250_dw: Fix deadlock in LCR workaround 2015-03-11 16:39:52 +01:00
8250_early.c tty/serial: 8250_early: Add support for PXA UARTs 2015-02-02 10:11:28 -08:00
8250_em.c Driver core patches for 3.19-rc1 2014-12-14 16:10:09 -08:00
8250_exar_st16c554.c
8250_fintek.c 8250/fintek: Use rs485 handler from serial_core 2014-11-06 14:59:21 -08:00
8250_fourport.c
8250_fsl.c serial: 8250: introduce up_to_u8250p() helper 2014-07-17 18:16:23 -07:00
8250_gsc.c parisc: Fix interrupt routing for C8000 serial ports 2013-07-31 23:42:32 +02:00
8250_hp300.c serial: hp300: Remove obsolete comments 2014-11-05 20:18:30 -08:00
8250_hub6.c
8250_mtk.c More ACPI and power management updates for 3.19-rc1 2014-12-18 20:28:33 -08:00
8250_omap.c serial: 8250_omap: Use UPSTAT_AUTORTS for RTS handling 2015-02-02 10:11:28 -08:00
8250_pci.c serial:8250:8250_pci: delete unneeded quirk entries 2015-03-07 03:06:51 +01:00
8250_pnp.c serial: 8250_pnp: Enable PNP_CONSOLE for console ports 2015-02-02 10:11:25 -08:00
8250.h serial: 8250: sparse warning of incorrect type 2014-11-06 14:58:28 -08:00
Kconfig tty: serial: 8250: omap: add ttySx console if the user didn't 2015-01-09 14:10:46 -08:00
Makefile tty: serial: Add 8250-core based omap driver 2014-11-05 19:05:13 -08:00
serial_cs.c tty: delete non-required instances of include <linux/init.h> 2014-01-07 17:05:21 -08:00