]> git.baikalelectronics.ru Git - kernel.git/commit
serial: 8250_fsl: fix handle_irq locking
authorJohan Hovold <johan@kernel.org>
Mon, 27 Feb 2023 08:50:46 +0000 (09:50 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 22 Mar 2023 12:33:55 +0000 (13:33 +0100)
commitfffdd8f81db13e162288e906c806409290abe690
tree667bf9043ec12c224248516910b9d28004328902
parent7a98312c42bf41d750d177f7733bfae978015306
serial: 8250_fsl: fix handle_irq locking

commit ff56d63d644e70b2c610a6af65196e823bea6ed5 upstream.

The 8250 handle_irq callback is not just called from the interrupt
handler but also from a timer callback when polling (e.g. for ports
without an interrupt line). Consequently the callback must explicitly
disable interrupts to avoid a potential deadlock with another interrupt
in polled mode.

Fix up the two paths in the freescale callback that failed to re-enable
interrupts when polling.

Fixes: 57b0237b9ec9 ("serial: 8250: fix handle_irq locking")
Cc: stable@vger.kernel.org # 5.13
Reported-by: Dan Carpenter <error27@gmail.com>
Link: https://lore.kernel.org/r/Y/xYzqp4ogmOF5t0@kili
Signed-off-by: Johan Hovold <johan@kernel.org>
Acked-by: Jiri Slaby <jirislaby@kernel.org>
Link: https://lore.kernel.org/r/20230227085046.24282-1-johan@kernel.org
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/tty/serial/8250/8250_fsl.c