mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH v6 0/3] serial: fix IRQ chain race, baud fallback, and uartclk overflow
@ 2026-09-30  7:48 Hui Peng
  2026-09-30  7:48 ` [PATCH v6 1/3] serial: 8250: fix deadlock in serial8250_register_ports() Hui Peng
                   ` (2 more replies)
  0 siblings, 3 replies; 6+ messages in thread
From: Hui Peng @ 2026-09-30  7:48 UTC (permalink / raw)
  To: Greg Kroah-Hartman, Jiri Slaby, John Ogness, Ilpo Järvinen
  Cc: Andy Shevchenko, linux-serial, linux-kernel, stable, Hui Peng

This series addresses three concurrency and integer overflow issues in the
serial driver core and 8250 driver:

1. Fix a mutex vs spinlock deadlock in serial8250_register_ports() during
   IRQ chain setup.
2. Fix baud rate fallback in uart_get_baud_rate() when custom divisor is
   in use.
3. Replace manual baud_base overflow check in uart_set_info() with
   check_mul_overflow(new_info->baud_base, 16, &uartclk), preventing
   32-bit unsigned arithmetic wraparound.

All 3 patches have been ported to the latest tip of mainline (551c722f4080)
and dynamically verified in QEMU KVM with CONFIG_KASAN=y.

Changes in v6:
- Use check_mul_overflow() in patch 3/3 as suggested by Jiri Slaby.

Hui Peng (3):
  serial: 8250: fix deadlock in serial8250_register_ports()
  serial: core: fix baud rate fallback in uart_get_baud_rate()
  serial: core: reject baud_base values that overflow port->uartclk in
    uart_set_info()

 drivers/tty/serial/8250/8250_core.c |  4 ++--
 drivers/tty/serial/serial_core.c    | 12 +++++++++---
 2 files changed, 11 insertions(+), 5 deletions(-)

-- 
2.47.3

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2026-09-30 10:00 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-09-30  7:48 [PATCH v6 0/3] serial: fix IRQ chain race, baud fallback, and uartclk overflow Hui Peng
2026-09-30  7:48 ` [PATCH v6 1/3] serial: 8250: fix deadlock in serial8250_register_ports() Hui Peng
2026-09-30  7:56   ` Ilpo Järvinen
2026-09-30 10:00   ` Andy Shevchenko
2026-09-30  7:48 ` [PATCH v6 2/3] serial: core: fix baud rate fallback in uart_get_baud_rate() Hui Peng
2026-09-30  7:48 ` [PATCH v6 3/3] serial: core: reject baud_base values that overflow port->uartclk in uart_set_info() Hui Peng

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®