From: Johan Hovold <johan+linaro@xxxxxxxxxx> commit 23f5f5debcaac1399cfeacec215278bf6dbc1d11 upstream. A commit adding back the stopping of tx on port shutdown failed to add back the locking which had also been removed by commit e83766334f96 ("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: d8aca2f96813 ("tty: serial: qcom-geni-serial: stop operations in progress at shutdown") Fixes: 947cc4ecc06c ("serial: qcom-geni: fix soft lockup on sw flow control and suspend") Cc: stable@xxxxxxxxxxxxxxx # 6.3 Reviewed-by: Bartosz Golaszewski <bartosz.golaszewski@xxxxxxxxxx> Signed-off-by: Johan Hovold <johan+linaro@xxxxxxxxxx> Reviewed-by: Douglas Anderson <dianders@xxxxxxxxxxxx> Link: https://lore.kernel.org/r/20241009145110.16847-4-johan+linaro@xxxxxxxxxx Signed-off-by: Greg Kroah-Hartman <gregkh@xxxxxxxxxxxxxxxxxxx> --- drivers/tty/serial/qcom_geni_serial.c | 2 ++ 1 file changed, 2 insertions(+) --- a/drivers/tty/serial/qcom_geni_serial.c +++ b/drivers/tty/serial/qcom_geni_serial.c @@ -1096,10 +1096,12 @@ static void qcom_geni_serial_shutdown(st { disable_irq(uport->irq); + uart_port_lock_irq(uport); qcom_geni_serial_stop_tx(uport); qcom_geni_serial_stop_rx(uport); qcom_geni_serial_cancel_tx_cmd(uport); + uart_port_unlock_irq(uport); } static void qcom_geni_serial_flush_buffer(struct uart_port *uport) Patches currently in stable-queue which might be from johan+linaro@xxxxxxxxxx are queue-6.11/serial-qcom-geni-revert-broken-hibernation-support.patch queue-6.11/serial-qcom-geni-fix-dma-rx-cancellation.patch queue-6.11/serial-qcom-geni-fix-receiver-enable.patch queue-6.11/serial-qcom-geni-fix-shutdown-race.patch queue-6.11/serial-qcom-geni-fix-polled-console-initialisation.patch