]> asedeno.scripts.mit.edu Git - linux.git/commit
serial: imx: fix locking in set_termios()
authorSergey Organov <sorganov@gmail.com>
Tue, 11 Jun 2019 12:05:24 +0000 (15:05 +0300)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 18 Jun 2019 07:30:44 +0000 (09:30 +0200)
commit4e828c3e09201512be5ee162393f334321f7cf01
tree9fb2200d817392b94e97300177b014004f23ef29
parentda0f843e6e6ff23790e9d97a05dc555ee2e3fa11
serial: imx: fix locking in set_termios()

imx_uart_set_termios() called imx_uart_rts_active(), or
imx_uart_rts_inactive() before taking port->port.lock.

As a consequence, sport->port.mctrl that these functions modify
could have been changed without holding port->port.lock.

Moved locking of port->port.lock above the calls to fix the issue.

Signed-off-by: Sergey Organov <sorganov@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/tty/serial/imx.c