Skip to content

Commit 23f5f5d

Browse files
jhovoldgregkh
authored andcommitted
serial: qcom-geni: fix shutdown race
A commit adding back the stopping of tx on port shutdown failed to add back the locking which had also been removed by commit e837663 ("tty: serial: qcom_geni_serial: No need to stop tx/rx on UART shutdown"). Holding the port lock is needed to serialise against the console code, which may update the interrupt enable register and access the port state. Fixes: d8aca2f ("tty: serial: qcom-geni-serial: stop operations in progress at shutdown") Fixes: 947cc4e ("serial: qcom-geni: fix soft lockup on sw flow control and suspend") Cc: [email protected] # 6.3 Reviewed-by: Bartosz Golaszewski <[email protected]> Signed-off-by: Johan Hovold <[email protected]> Reviewed-by: Douglas Anderson <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Greg Kroah-Hartman <[email protected]>
1 parent 19df766 commit 23f5f5d

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

drivers/tty/serial/qcom_geni_serial.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1114,10 +1114,12 @@ static void qcom_geni_serial_shutdown(struct uart_port *uport)
11141114
{
11151115
disable_irq(uport->irq);
11161116

1117+
uart_port_lock_irq(uport);
11171118
qcom_geni_serial_stop_tx(uport);
11181119
qcom_geni_serial_stop_rx(uport);
11191120

11201121
qcom_geni_serial_cancel_tx_cmd(uport);
1122+
uart_port_unlock_irq(uport);
11211123
}
11221124

11231125
static void qcom_geni_serial_flush_buffer(struct uart_port *uport)

0 commit comments

Comments
 (0)