[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <20230316132452.76478-1-ilpo.jarvinen@linux.intel.com>
Date: Thu, 16 Mar 2023 15:24:50 +0200
From: Ilpo Järvinen <ilpo.jarvinen@...ux.intel.com>
To: linux-serial@...r.kernel.org,
Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
Jiri Slaby <jirislaby@...nel.org>
Cc: linux-kernel@...r.kernel.org,
Ilpo Järvinen <ilpo.jarvinen@...ux.intel.com>
Subject: [PATCH 0/2] tty/serial: Fix tcsetattr() TCSADRAIN/FLUSH and write() races
Fix two races related TCSADRAIN/FLUSH. One in tty core and the other
that can occur when 8250 UART is using DMA for Tx.
These might be slightly controversial as it requires userspace to race
write() with tcsetattr() to trigger these races. But since the races
still seem fixable on kernel side, I made these patches.
Ilpo Järvinen (2):
tty: Prevent writing chars during tcsetattr TCSADRAIN/FLUSH
serial: 8250: Fix serial8250_tx_empty() race with DMA Tx
drivers/tty/serial/8250/8250.h | 12 ++++++++
drivers/tty/serial/8250/8250_port.c | 7 ++++-
drivers/tty/tty.h | 2 ++
drivers/tty/tty_io.c | 4 +--
drivers/tty/tty_ioctl.c | 45 +++++++++++++++++++++--------
5 files changed, 55 insertions(+), 15 deletions(-)
--
2.30.2
Powered by blists - more mailing lists