From: Konrad Dybcio <konrad.dybcio@oss.qualcomm.com>
To: Stephan Gerhold <stephan.gerhold@linaro.org>,
Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
Jiri Slaby <jirislaby@kernel.org>
Cc: linux-arm-msm@vger.kernel.org, linux-kernel@vger.kernel.org,
linux-serial@vger.kernel.org, Sam Day <me@samcday.com>
Subject: Re: [PATCH] serial: msm: Disable DMA for kernel console UART
Date: Tue, 7 Jul 2026 09:58:13 +0200 [thread overview]
Message-ID: <45bf13a4-6538-43b0-9563-38178c4d0282@oss.qualcomm.com> (raw)
In-Reply-To: <20260706-serial-msm-console-dma-collision-v1-1-3179b8cb1d89@linaro.org>
On 7/6/26 8:03 PM, Stephan Gerhold wrote:
> At the moment, concurrent writes from userspace and the kernel to the
> console can trigger a race condition that results in an infinite loop of
> the same messages printed over and over again. This is most likely to
> happen during system startup or shutdown when the init system starts/stops
> a large number of system services that interact with various kernel code.
>
> When userspace writes to the TTY device, the driver initiates an
> asynchronous DMA transfer and releases the port lock. At the same moment,
> the kernel printk path might grab the port lock and re-configure the UART
> controller for PIO, without waiting for the DMA operation to complete. It
> seems like this collision results in zero progress being reported for the
> DMA engine, so the same text is printed to the console over and over again.
>
> For the kernel console, we want a reliable output path that will be
> functional even during crashes etc. So rather than implementing complex
> code to synchronize the kernel console write routines with the userspace
> DMA write routines, simply disable DMA for the console UART instance.
>
> Similar checks exist in many other serial drivers, e.g. 8250_port.c,
> imx.c, sh-sci.c etc.
>
> Cc: stable@vger.kernel.org
> Fixes: 3a878c430fd6 ("tty: serial: msm: Add TX DMA support")
> Signed-off-by: Stephan Gerhold <stephan.gerhold@linaro.org>
> ---
Acked-by: Konrad Dybcio <konrad.dybcio@oss.qualcomm.com>
Konrad
prev parent reply other threads:[~2026-07-07 7:58 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-07-06 18:03 [PATCH] serial: msm: Disable DMA for kernel console UART Stephan Gerhold
2026-07-07 7:58 ` Konrad Dybcio [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=45bf13a4-6538-43b0-9563-38178c4d0282@oss.qualcomm.com \
--to=konrad.dybcio@oss.qualcomm.com \
--cc=gregkh@linuxfoundation.org \
--cc=jirislaby@kernel.org \
--cc=linux-arm-msm@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-serial@vger.kernel.org \
--cc=me@samcday.com \
--cc=stephan.gerhold@linaro.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
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