Skip to content
Commit 54a44d54 authored by Nikita Yushchenko's avatar Nikita Yushchenko Committed by Greg Kroah-Hartman
Browse files

tty: serial: fsl_lpuart: fix del_timer_sync() vs timer routine deadlock



Problem found via lockdep:

- lpuart_set_termios() calls del_timer_sync(&sport->lpuart_timer) while
  holding sport->port.lock

- sport->lpuart_timer routine is lpuart_timer_func() that calls
  lpuart_copy_rx_to_tty() that acquires same lock.

To fix, move Rx DMA stopping out of lock, as it already is in other places
in the same file.

While at it, also make Rx DMA start/stop code to look the same is in
other places in the same file.

Signed-off-by: default avatarNikita Yushchenko <nikita.yoush@cogentembedded.com>
Tested-by: default avatarStefan Agner <stefan@agner.ch>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 623ac1d4
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment