[PATCH v3 0/2] serial: 8250_mid: fix race condition between output flush and termios update
From: Tate Whiteberg
Date: Mon Aug 31 2026 - 14:14:35 EST
Fix a race condition in which setting termios while still transmitting
can corrupt transmission.
Changes in v3:
1. Patch 2: use scoped_guard(), as suggested by jirislaby@xxxxxxxxxx
2. Patch 2: Update Fixes tag, formatting changes as suggested by
andriy.shevchenko@xxxxxxxxx
Changes in v2:
Split original patch into two: a prerequisite to to expose
wait_for_xmitr() and a successor to fix the bug.
Tate Whiteberg (2):
serial: 8250: export and rename wait_for_xmitr()
serial: 8250_mid: wait for LSR tx empty before setting termios
drivers/tty/serial/8250/8250.h | 1 +
drivers/tty/serial/8250/8250_mid.c | 15 +++++++++++----
drivers/tty/serial/8250/8250_port.c | 13 +++++++------
3 files changed, 19 insertions(+), 10 deletions(-)
--
2.43.0