serial: fix IRQ chain race, baud fallback, and uartclk overflow
Get series with b4
b4 am [email protected]Versions newest first · linked by author and title
- v6 Latest3 patches 2 repliesIn review
- v53 patches 2 repliesSuperseded
- v43 patches 3 repliesSuperseded
Earlier versions · 2
| Version | Posted | Patches | Replies | Status |
|---|---|---|---|---|
| v3 | 3 patches | 1 reply | Superseded | |
| v2 | 3 patches | 2 replies | Superseded |
Changes in v6 from the cover letter
- Use check_mul_overflow() in patch 3/3 as suggested by Jiri Slaby.
Patches in v6 No applies recorded yet
| # | Subject and files | Size | Replies | Applied |
|---|---|---|---|---|
| 1/3 | serial: 8250: fix deadlock in serial8250_register_ports()drivers/ | +1 | 2 replies | |
| 2/3 | serial: core: fix baud rate fallback in uart_get_baud_rate()drivers/ | +3 | 0 replies | |
| 3/3 | serial: core: reject baud_base values that overflow port->uartclk in uart_set_info()drivers/ | +1 | 0 replies |
Reviews trailers per patch
All 3 patches have a Reviewed-by or Acked-by.
| Patch | Ilpo Järvinen |
|---|---|
| 1/3 | R-b |
| 2/3 | R-b |
| 3/3 | R-b |
Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.
Cover letter [PATCH v6 0/3] serial: fix IRQ chain race, baud fallback, and uartclk overflow
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(-)
Signature · 1 line
2.47.3