]> git.karo-electronics.de Git - karo-tx-linux.git/commit
ENGR00178951-1 serial/imx: dead lock dedected when handle sysrq
authorJason Liu <r64343@freescale.com>
Sun, 1 Apr 2012 08:33:25 +0000 (16:33 +0800)
committerLothar Waßmann <LW@KARO-electronics.de>
Fri, 24 May 2013 06:34:22 +0000 (08:34 +0200)
commite21bdfbe1f07e0b6f19ebf0dba5c1f3ab7314c27
tree2a95d22d5537f1c8cbd9ef027c95c4eaa3a406ca
parent583295b96af1348cbf54b1d096a7fbeb5a942113
ENGR00178951-1 serial/imx: dead lock dedected when handle sysrq

imx_rxint -> spin_lock_irqsave(&sport->port.lock, flags);

And then it will call the following functions:

uart_handle_sysrq_char -> handle_sysrq -> printk ->
__call_console_write_drivers -> imx_console_write ->

Here the imx_console_write function will call:
spin_lock_irqsave(&sport->port.lock, flags);

The A-A deadlock happens. We need spin_unlock before handle sysrq char
and spin_lock again after it.

Signed-off-by: Jason Liu <r64343@freescale.com>
drivers/tty/serial/imx.c