From: Krzysztof Kozlowski <krzk@kernel•org>
To: Tudor Ambarus <tudor.ambarus@linaro•org>,
Alim Akhtar <alim.akhtar@samsung•com>,
Greg Kroah-Hartman <gregkh@linuxfoundation•org>,
Jiri Slaby <jirislaby@kernel•org>,
Ben Dooks <ben-linux@fluff•org>
Cc: linux-arm-kernel@lists•infradead.org,
linux-samsung-soc@vger•kernel.org, linux-kernel@vger•kernel.org,
linux-serial@vger•kernel.org, john.ogness@linutronix•d,
peter.griffin@linaro•org, andre.draszik@linaro•org,
jyescas@google•com, kernel-team@android•com,
stable@vger•kernel.org, John Ogness <john.ogness@linutronix•de>
Subject: Re: [PATCH] tty: serial: samsung: Remove redundant port lock acquisition in rx helpers
Date: Sun, 24 May 2026 21:42:08 +0200 [thread overview]
Message-ID: <e9c5e57c-25d8-45f1-bc3e-696393cab4dd@kernel.org> (raw)
In-Reply-To: <20260515-samsung-tty-flow-control-deadlock-v1-1-93255edbc9bc@linaro.org>
On 15/05/2026 14:41, Tudor Ambarus wrote:
> Sashiko identified a deadlock when the console flow is engaged [1].
>
> When console flow control is enabled (UPF_CONS_FLOW),
> s3c24xx_serial_stop_tx() calls s3c24xx_serial_rx_enable() and
> s3c24xx_serial_start_tx() calls s3c24xx_serial_rx_disable().
>
> The serial core framework invokes the .stop_tx() and .start_tx()
> callbacks with the port->lock spinlock already held. Furthermore, all
> internal driver paths that invoke stop_tx (such as the DMA TX
> completion handler s3c24xx_serial_tx_dma_complete() or the PIO TX IRQ
> handler s3c24xx_serial_tx_irq()) also acquire port->lock prior to
> calling it. (Note that s3c24xx_serial_start_tx() is only invoked by the
> serial core).
>
> However, s3c24xx_serial_rx_enable() and s3c24xx_serial_rx_disable()
> unconditionally attempt to acquire port->lock again using
> uart_port_lock_irqsave(). Since spinlocks are not recursive, this
> causes a deadlock on the same CPU when console flow control is engaged.
>
> Remove the redundant lock acquisition from both rx helper functions.
>
Acked-by: Krzysztof Kozlowski <krzysztof.kozlowski@oss•qualcomm.com>
Best regards,
Krzysztof
prev parent reply other threads:[~2026-05-24 19:42 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-05-15 12:41 [PATCH] tty: serial: samsung: Remove redundant port lock acquisition in rx helpers Tudor Ambarus
2026-05-24 19:42 ` Krzysztof Kozlowski [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=e9c5e57c-25d8-45f1-bc3e-696393cab4dd@kernel.org \
--to=krzk@kernel$(echo .)org \
--cc=alim.akhtar@samsung$(echo .)com \
--cc=andre.draszik@linaro$(echo .)org \
--cc=ben-linux@fluff$(echo .)org \
--cc=gregkh@linuxfoundation$(echo .)org \
--cc=jirislaby@kernel$(echo .)org \
--cc=john.ogness@linutronix$(echo .)d \
--cc=john.ogness@linutronix$(echo .)de \
--cc=jyescas@google$(echo .)com \
--cc=kernel-team@android$(echo .)com \
--cc=linux-arm-kernel@lists$(echo .)infradead.org \
--cc=linux-kernel@vger$(echo .)kernel.org \
--cc=linux-samsung-soc@vger$(echo .)kernel.org \
--cc=linux-serial@vger$(echo .)kernel.org \
--cc=peter.griffin@linaro$(echo .)org \
--cc=stable@vger$(echo .)kernel.org \
--cc=tudor.ambarus@linaro$(echo .)org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox