mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH v3 0/4] serial: fix ioctl hangup race
@ 2026-09-07  6:44 Johan Hovold
  2026-09-07  6:44 ` [PATCH v3 1/4] serial: revert guards in uart_wait_modem_status() Johan Hovold
                   ` (3 more replies)
  0 siblings, 4 replies; 8+ messages in thread
From: Johan Hovold @ 2026-09-07  6:44 UTC (permalink / raw)
  To: Greg Kroah-Hartman, Jiri Slaby; +Cc: linux-serial, linux-kernel, Johan Hovold

The tty ioctls can race with hangup and end up calling into a tty
driver for a device that is already gone or powered down.

Included in v3 are also two related fixes for issues highlighted by
Sashiko.

Johan


Changes in v3
 - revert guards in uart_wait_modem_status()
 - fix race in TIOCMIWAIT (new)
 - abort TIOCMIWAIT on hangup (new)

Changes in v2
 - include TIOCMIWAIT which also access hardware
  - replace broken scoped_guard() construct in wait loop


Johan Hovold (4):
  serial: revert guards in uart_wait_modem_status()
  serial: fix ioctl hangup race
  serial: fix TIOCMIWAIT race
  serial: abort TIOCMIWAIT on hangup

 drivers/tty/serial/serial_core.c | 50 +++++++++++++++++++++++---------
 1 file changed, 37 insertions(+), 13 deletions(-)

-- 
2.55.0


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

end of thread, other threads:[~2026-09-07  7:38 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-09-07  6:44 [PATCH v3 0/4] serial: fix ioctl hangup race Johan Hovold
2026-09-07  6:44 ` [PATCH v3 1/4] serial: revert guards in uart_wait_modem_status() Johan Hovold
2026-09-07  6:47   ` Jiri Slaby
2026-09-07  6:51     ` Jiri Slaby
2026-09-07  7:37       ` Johan Hovold
2026-09-07  6:44 ` [PATCH v3 2/4] serial: fix ioctl hangup race Johan Hovold
2026-09-07  6:44 ` [PATCH v3 3/4] serial: fix TIOCMIWAIT race Johan Hovold
2026-09-07  6:44 ` [PATCH v3 4/4] serial: abort TIOCMIWAIT on hangup Johan Hovold

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®