[PATCH v6 0/3] serial: fix IRQ chain race, baud fallback, and uartclk overflow
From: Hui Peng
Date: Wed Sep 30 2026 - 03:56:55 EST
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