linux/drivers/tty/serial/8250
Jacques Nilo 2e21172395 serial: 8250_dw: dispatch SysRq character in dw8250_handle_irq()
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 883c5a2bc9 ("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_check_sysrq_irqsave) so that captured
sysrq_ch is dispatched on scope exit, matching the fix in
serial8250_handle_irq().

Fixes: 883c5a2bc9 ("serial: 8250_dw: Rework dw8250_handle_irq() locking and IIR handling")
Cc: stable@vger.kernel.org
Reviewed-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com>
Signed-off-by: Jacques Nilo <jnilo@free.fr>
Link: https://patch.msgid.link/ed56fcaf4af24e4ed011a7bce206e0182acb761c.1778675349.git.jnilo@free.fr
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
History 2026-05-22 11:51:35 +02:00
..
8250.h serial: 8250_dw: Ensure BUSY is deasserted 2026-03-12 15:34:29 +01:00
8250_accent.c tty: serial: Remove redundant license text 2017-11-08 13:08:12 +01:00
8250_acorn.c Convert 'alloc_obj' family to use the new default GFP_KERNEL argument 2026-02-21 17:09:51 -08:00
8250_aspeed_vuart.c treewide, timers: Rename from_timer() to timer_container_of() 2025-06-08 09:07:37 +02:00
8250_bcm2835aux.c serial: 8250: Provide flag for IER toggling for RS485 2025-01-10 16:08:25 +01:00
8250_bcm7271.c serial: 8250: Switch to use hrtimer_setup() 2025-02-20 15:38:28 +01:00
8250_boca.c tty: serial: Remove redundant license text 2017-11-08 13:08:12 +01:00
8250_ce4100.c serial: 8520_ce4100: Reuse mem_serial_in() in ce4100_mem_serial_in() 2025-07-09 13:44:50 +02:00
8250_core.c tty: tty_port: add workqueue to flip TTY buffer 2026-03-12 15:26:29 +01:00
8250_dfl.c tty: serial: 8250: add DFL bus driver for Altera 16550. 2023-01-19 16:07:40 +01:00
8250_dma.c serial: 8250: Fix TX deadlock when using DMA 2026-03-12 15:29:59 +01:00
8250_dw.c serial: 8250_dw: dispatch SysRq character in dw8250_handle_irq() 2026-05-22 11:51:35 +02:00
8250_dwlib.c serial: remove quot_frac from serial8250_do_set_divisor() 2024-08-07 13:13:35 +02:00
8250_dwlib.h serial: 8250_dw: Revert "Move definitions to the shared header" 2024-06-04 14:07:58 +02:00
8250_early.c serial: switch uart_port::iotype to enum uart_iotype 2025-04-25 13:46:31 +02:00
8250_em.c serial: 8250: sanitize uart_port::serial_{in,out}() types 2025-06-17 13:42:34 +02:00
8250_exar.c Merge 6.18-rc3 into tty-next 2025-10-27 08:17:40 +01:00
8250_exar_st16c554.c tty: serial: Remove redundant license text 2017-11-08 13:08:12 +01:00
8250_fintek.c serial: 8250_fintek: Add support for F81214E 2026-03-30 17:36:09 +02:00
8250_fourport.c tty: serial: Remove redundant license text 2017-11-08 13:08:12 +01:00
8250_fsl.c serial: 8250: use serial_port_in/out() helpers 2025-03-20 08:00:52 -07:00
8250_hp300.c Convert 'alloc_obj' family to use the new default GFP_KERNEL argument 2026-02-21 17:09:51 -08:00
8250_hub6.c tty: serial: Remove redundant license text 2017-11-08 13:08:12 +01:00
8250_ingenic.c serial: 8250: sanitize uart_port::serial_{in,out}() types 2025-06-17 13:42:34 +02:00
8250_ioc3.c DT updates for ralink, mobileye and ralink 2025-07-31 11:08:55 -07:00
8250_keba.c serial: 8250_keba: Use dev_err_probe() 2025-12-17 15:06:32 +01:00
8250_loongson.c serial: 8250: longson: Fix NULL vs IS_ERR() bug in probe 2025-12-17 15:11:00 +01:00
8250_lpc18xx.c serial: 8250: sanitize uart_port::serial_{in,out}() types 2025-06-17 13:42:34 +02:00
8250_lpss.c serial: 8250_lpss: copy dma_param using devm_kmemdup() 2024-01-04 16:21:51 +01:00
8250_men_mcb.c 8250_men_mcb: drop unneeded MODULE_ALIAS 2026-01-16 14:25:05 +01:00
8250_mid.c serial: 8250_mid: Remove 8250_pci usage 2023-09-18 11:14:43 +02:00
8250_mtk.c serial: 8250_mtk: Enable baud clock and manage in runtime PM 2025-10-22 12:13:54 +02:00
8250_ni.c Convert 'alloc_obj' family to use the new default GFP_KERNEL argument 2026-02-21 17:09:51 -08:00
8250_of.c Convert 'alloc_obj' family to use the new default GFP_KERNEL argument 2026-02-21 17:09:51 -08:00
8250_omap.c serial: 8250_omap: Remove custom deprecated baud setting routine 2026-01-23 17:24:54 +01:00
8250_parisc.c tty: add missing MODULE_DESCRIPTION() macros 2024-06-24 16:10:11 +02:00
8250_pci.c Linux 7.0-rc5 2026-03-23 09:59:16 +01:00
8250_pci1xxxx.c serial: 8250_pcilib: Replace deprecated PCI functions 2025-10-22 12:06:53 +02:00
8250_pcilib.c serial: 8250_pcilib: Replace deprecated PCI functions 2025-10-22 12:06:53 +02:00
8250_pcilib.h serial: 8250_pcilib: Replace deprecated PCI functions 2025-10-22 12:06:53 +02:00
8250_pericom.c serial: 8250_pericom: Use UART_LCR_DLAB 2022-06-27 14:33:15 +02:00
8250_platform.c Convert more 'alloc_obj' cases to default GFP_KERNEL arguments 2026-02-21 20:03:00 -08:00
8250_pnp.c serial: 8250_pnp: Remove unneeded ->iotype assignment 2025-02-04 14:44:53 +01:00
8250_port.c serial: 8250: dispatch SysRq character in serial8250_handle_irq() 2026-05-22 11:51:35 +02:00
8250_pxa.c serial: Switch back to struct platform_driver::remove() 2024-10-11 08:13:28 +02:00
8250_rsa.c TTY/Serial changes for 6.19-rc1 2025-12-06 18:38:19 -08:00
8250_rt288x.c serial: 8250: sanitize uart_port::serial_{in,out}() types 2025-06-17 13:42:34 +02:00
8250_tegra.c serial: Switch back to struct platform_driver::remove() 2024-10-11 08:13:28 +02:00
8250_uniphier.c serial: 8250: sanitize uart_port::serial_{in,out}() types 2025-06-17 13:42:34 +02:00
Kconfig serial: 8250: loongson: Enable building on MIPS Loongson64 2026-03-30 17:36:20 +02:00
Makefile TTY/Serial changes for 6.19-rc1 2025-12-06 18:38:19 -08:00
serial_cs.c Convert 'alloc_obj' family to use the new default GFP_KERNEL argument 2026-02-21 17:09:51 -08:00