]> git.baikalelectronics.ru Git - kernel.git/commit
tty: serial: imx: move del_timer_sync() to avoid potential deadlock
authorEric Miao <eric.miao@linaro.org>
Thu, 22 Dec 2011 21:39:27 +0000 (05:39 +0800)
committerGreg Kroah-Hartman <gregkh@suse.de>
Thu, 5 Jan 2012 00:30:36 +0000 (16:30 -0800)
commit3ce21925ebad5c7b243e978999d11b0e3279f784
tree022d3696bb38afa1486b2962ba3f51458b35b21b
parent074b2ccf19612c2c36d2f7daf414c241e8a3d97e
tty: serial: imx: move del_timer_sync() to avoid potential deadlock

del_timer_sync() acquires its own lock and doesn't have to be nested
within the spinlock of sport->port.lock in imx_set_termios(),  which
will cause potential deadlock.  Fix this by moving it outside.

Cc: Fabio Estevam <fabio.estevam@freescale.com>
Cc: Shawn Guo <shawn.guo@linaro.org>
Cc: Sascha Hauer <s.hauer@pengutronix.de>
Cc: Greg Kroah-Hartman <gregkh@suse.de>
Signed-off-by: Eric Miao <eric.miao@linaro.org>
Signed-off-by: Shawn Guo <shawn.guo@linaro.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
drivers/tty/serial/imx.c