Skip to content

Commit 988c7c0

Browse files
Jiri Slabygregkh
authored andcommitted
serial: samsung_tty: do not unlock port->lock for uart_write_wakeup()
The commit c15c374 (serial: samsung: fix potential soft lockup during uart write) added an unlock of port->lock before uart_write_wakeup() and a lock after it. It was always problematic to write data from tty_ldisc_ops::write_wakeup and it was even documented that way. We fixed the line disciplines to conform to this recently. So if there is still a missed one, we should fix them instead of this workaround. On the top of that, s3c24xx_serial_tx_dma_complete() in this driver still holds the port->lock while calling uart_write_wakeup(). So revert the wrap added by the commit above. Cc: Thomas Abraham <[email protected]> Cc: Kyungmin Park <[email protected]> Cc: Hyeonkook Kim <[email protected]> Signed-off-by: Jiri Slaby <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Greg Kroah-Hartman <[email protected]>
1 parent 4f6f194 commit 988c7c0

File tree

1 file changed

+1
-4
lines changed

1 file changed

+1
-4
lines changed

drivers/tty/serial/samsung_tty.c

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -921,11 +921,8 @@ static void s3c24xx_serial_tx_chars(struct s3c24xx_uart_port *ourport)
921921
return;
922922
}
923923

924-
if (uart_circ_chars_pending(xmit) < WAKEUP_CHARS) {
925-
spin_unlock(&port->lock);
924+
if (uart_circ_chars_pending(xmit) < WAKEUP_CHARS)
926925
uart_write_wakeup(port);
927-
spin_lock(&port->lock);
928-
}
929926

930927
if (uart_circ_empty(xmit))
931928
s3c24xx_serial_stop_tx(port);

0 commit comments

Comments
 (0)