summaryrefslogtreecommitdiff
path: root/drivers/tty/serial/imx.c
diff options
context:
space:
mode:
authorSergey Organov <sorganov@gmail.com>2023-02-01 17:26:56 +0300
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2023-02-08 13:11:55 +0100
commite1c6a7e5f87d66fce5c6890845400f8425acda4f (patch)
treeae748c94e1e8e6ce710a2a3c33283df79644f7b0 /drivers/tty/serial/imx.c
parent496a4471b7c3ae5c0be1a3fccd69e7debc127e08 (diff)
serial: imx: do not sysrq broken chars
Do not call uart_handle_sysrq_char() if we got any receive error along with the character, as we don't want random junk to be considered a sysrq. Signed-off-by: Sergey Organov <sorganov@gmail.com> Link: https://lore.kernel.org/r/20230201142700.4346-4-sorganov@gmail.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/tty/serial/imx.c')
-rw-r--r--drivers/tty/serial/imx.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/drivers/tty/serial/imx.c b/drivers/tty/serial/imx.c
index 2812222b53b7..bd5d426c28fb 100644
--- a/drivers/tty/serial/imx.c
+++ b/drivers/tty/serial/imx.c
@@ -913,9 +913,6 @@ static irqreturn_t __imx_uart_rxint(int irq, void *dev_id)
continue;
}
- if (uart_handle_sysrq_char(&sport->port, (unsigned char)rx))
- continue;
-
if (unlikely(rx & URXD_ERR)) {
if (rx & URXD_BRK)
sport->port.icount.brk++;
@@ -944,6 +941,8 @@ static irqreturn_t __imx_uart_rxint(int irq, void *dev_id)
flg = TTY_OVERRUN;
sport->port.sysrq = 0;
+ } else if (uart_handle_sysrq_char(&sport->port, (unsigned char)rx)) {
+ continue;
}
if (sport->port.ignore_status_mask & URXD_DUMMY_READ)