[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAMRc=MeYSsh+MOrOHSabiHuyGOrZK330WuNXcGDtg-siJFya=g@mail.gmail.com>
Date: Tue, 1 Oct 2024 15:36:57 +0200
From: Bartosz Golaszewski <brgl@...ev.pl>
To: Johan Hovold <johan+linaro@...nel.org>
Cc: Greg Kroah-Hartman <gregkh@...uxfoundation.org>, Jiri Slaby <jirislaby@...nel.org>,
Bjorn Andersson <andersson@...nel.org>, Konrad Dybcio <konradybcio@...nel.org>,
Douglas Anderson <dianders@...omium.org>, linux-arm-msm@...r.kernel.org,
linux-kernel@...r.kernel.org, linux-serial@...r.kernel.org,
stable@...r.kernel.org, Bartosz Golaszewski <bartosz.golaszewski@...aro.org>
Subject: Re: [PATCH v2 2/7] serial: qcom-geni: fix shutdown race
On Tue, Oct 1, 2024 at 2:51 PM Johan Hovold <johan+linaro@...nel.org> wrote:
>
> 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@...r.kernel.org # 6.3
> Cc: Bartosz Golaszewski <bartosz.golaszewski@...aro.org>
> Signed-off-by: Johan Hovold <johan+linaro@...nel.org>
> ---
> drivers/tty/serial/qcom_geni_serial.c | 2 ++
> 1 file changed, 2 insertions(+)
>
> diff --git a/drivers/tty/serial/qcom_geni_serial.c b/drivers/tty/serial/qcom_geni_serial.c
> index 9ea6bd09e665..b6a8729cee6d 100644
> --- 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(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)
> --
> 2.45.2
>
>
I already reviewed this[1]. I suggest using b4 for automated tag pickup.
Bart
Reviewed-by: Bartosz Golaszewski <bartosz.golaszewski@...aro.org>
[1] https://lore.kernel.org/all/CAMRc=Md-B3MCdjBA6Z03Tn09Qdq_O=2Gij=0kr8HiLtpp11kVg@mail.gmail.com/#t
Powered by blists - more mailing lists