From: "Ilpo Järvinen" <ilpo.jarvinen@linux.intel.com>
To: Jacques Nilo <jnilo@free.fr>
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
Jiri Slaby <jirislaby@kernel.org>,
linux-serial <linux-serial@vger.kernel.org>,
LKML <linux-kernel@vger.kernel.org>,
Johan Hovold <johan@kernel.org>,
stable@vger.kernel.org
Subject: Re: [PATCH 3/3] serial: 8250_dw: dispatch SysRq character in dw8250_handle_irq()
Date: Wed, 13 May 2026 14:50:10 +0300 (EEST) [thread overview]
Message-ID: <fa464674-82cd-35e7-9317-92475694e291@linux.intel.com> (raw)
In-Reply-To: <340a4a76e5dbeb2e49ad4b8d41b9631e09e94bec.1778592805.git.jnilo@free.fr>
[-- Attachment #1: Type: text/plain, Size: 1705 bytes --]
On Tue, 12 May 2026, Jacques Nilo wrote:
> dw8250_handle_irq() calls serial8250_handle_irq_locked() with the port
> lock held via guard(uart_port_lock_irqsave). The guard destructor is
> plain uart_port_unlock_irqrestore(), so a SysRq character captured into
> port->sysrq_ch by uart_prepare_sysrq_char() is dropped without ever
> being dispatched to handle_sysrq().
>
> This is the same regression pattern as in serial8250_handle_irq(),
> introduced when 883c5a2bc934 ("serial: 8250_dw: Rework
> dw8250_handle_irq() locking and IIR handling") moved the function to
> the guard()-based locking scheme without using the sysrq-aware unlock
> helper.
>
> Switch to guard(uart_port_lock_sysrq_irqsave) so that captured
> sysrq_ch is dispatched on scope exit, matching the fix in
> serial8250_handle_irq().
>
> Fixes: 883c5a2bc934 ("serial: 8250_dw: Rework dw8250_handle_irq() locking and IIR handling")
> Cc: stable@vger.kernel.org
> Signed-off-by: Jacques Nilo <jnilo@free.fr>
> ---
> drivers/tty/serial/8250/8250_dw.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/tty/serial/8250/8250_dw.c b/drivers/tty/serial/8250/8250_dw.c
> index 55e40c10f..237543fa7 100644
> --- a/drivers/tty/serial/8250/8250_dw.c
> +++ b/drivers/tty/serial/8250/8250_dw.c
> @@ -416,7 +416,7 @@ static int dw8250_handle_irq(struct uart_port *p)
> unsigned int quirks = d->pdata->quirks;
> unsigned int status;
>
> - guard(uart_port_lock_irqsave)(p);
> + guard(uart_port_lock_sysrq_irqsave)(p);
>
> switch (FIELD_GET(DW_UART_IIR_IID, iir)) {
> case UART_IIR_NO_INT:
>
Reviewed-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com>
--
i.
next prev parent reply other threads:[~2026-05-13 11:50 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <5efe9e03-4d86-43a0-9ec2-e610ff31095d@free.fr>
[not found] ` <cover.1778592805.git.jnilo@free.fr>
2026-05-12 13:46 ` [PATCH 2/3] serial: 8250: dispatch SysRq character in serial8250_handle_irq() Jacques Nilo
2026-05-13 11:49 ` Ilpo Järvinen
2026-05-12 13:46 ` [PATCH 3/3] serial: 8250_dw: dispatch SysRq character in dw8250_handle_irq() Jacques Nilo
2026-05-13 11:50 ` Ilpo Järvinen [this message]
2026-05-13 13:30 ` [PATCH v2 0/3] serial: 8250: fix BREAK+SysRq dispatch on guard()-locked IRQ handlers Jacques Nilo
2026-05-13 13:30 ` [PATCH v2 1/3] serial: core: introduce guard(uart_port_lock_check_sysrq_irqsave) Jacques Nilo
2026-05-13 13:35 ` Ilpo Järvinen
2026-05-13 13:30 ` [PATCH v2 2/3] serial: 8250: dispatch SysRq character in serial8250_handle_irq() Jacques Nilo
2026-05-13 13:30 ` [PATCH v2 3/3] serial: 8250_dw: dispatch SysRq character in dw8250_handle_irq() Jacques Nilo
2026-05-13 17:51 ` [PATCH v2 0/3] serial: 8250: fix BREAK+SysRq dispatch on guard()-locked IRQ handlers Andy Shevchenko
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=fa464674-82cd-35e7-9317-92475694e291@linux.intel.com \
--to=ilpo.jarvinen@linux.intel.com \
--cc=gregkh@linuxfoundation.org \
--cc=jirislaby@kernel.org \
--cc=jnilo@free.fr \
--cc=johan@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-serial@vger.kernel.org \
--cc=stable@vger.kernel.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