FAILED: patch "[PATCH] serial: qcom-geni: fix shutdown race" failed to apply to 6.6-stable tree
[email protected]
maintainerThe patch below does not apply to the 6.6-stable tree.
If someone wants it applied there, or to any other stable or longterm tree, then please email the backport, including the original git commit id to <[email protected]>.
To reproduce the conflict and resubmit, you may use the following commands:
git fetch https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/ linux-6.6.y
git checkout FETCH_HEAD
git cherry-pick -x 23f5f5debcaac1399cfeacec215278bf6dbc1d11
# <resolve conflicts, build, test, etc.>
git commit -s
git send-email --to '<[email protected]>' --in-reply-to '2024102142-pristine-mayday-9998@gregkh' --subject-prefix 'PATCH 6.6.y' HEAD^..
Possible dependencies:
thanks,
greg k-h
------------------ original commit in Linus's tree ------------------
From 23f5f5debcaac1399cfeacec215278bf6dbc1d11 Mon Sep 17 00:00:00 2001
From: Johan Hovold <[email protected]>
Date: Wed, 9 Oct 2024 16:51:04 +0200
Subject: [PATCH] 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 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.
drivers/tty/serial/qcom_geni_serial.c +2 -0
@@ -1114,10 +1114,12 @@ static void qcom_geni_serial_shutdown(struct uart_port *uport) {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)