Linux Serial subsystem development
 help / color / mirror / Atom feed
* [PATCH 0/3] tty: n_hdlc: fix hangup handling
@ 2026-10-28 13:20 Johan Hovold
  2026-10-28 13:20 ` [PATCH 1/3] tty: n_hdlc: fix missing write() hangup check Johan Hovold
                   ` (2 more replies)
  0 siblings, 3 replies; 7+ messages in thread
From: Johan Hovold @ 2026-10-28 13:20 UTC (permalink / raw)
  To: Greg Kroah-Hartman, Jiri Slaby; +Cc: linux-serial, linux-kernel, Johan Hovold

An LLM incorrectly flagged three hangup issues in n_hdlc as leading to
hangups stuck in uninterruptible sleep.

This used to be the case before commit c96cf923a98d ("tty: Don't block
on IO when ldisc change is pending") which incidentally fixed the stuck
hangup issues by turning tty_io_nonblock() into an indirect hangup
check.

Since then read() and write() can return -EAGAIN also for files opened
in blocking mode on ldisc changes, which looks questionable. This change
was added to address a regression introduced by a series adding missing
locking to tty_reopen() but should probably be reconsidered. [1]

This series addresses the underlying hangup issues and incorrect -EAGAIN
on hangup meanwhile.

Johan


[1] https://lore.kernel.org/all/alpine.LRH.2.02.1809191330590.19146@file01.intranet.prod.int.rdu2.redhat.com/


Johan Hovold (3):
  tty: n_hdlc: fix missing write() hangup check
  tty: n_hdlc: fix read() hangup race
  tty: n_hdlc: fix read() hangup check

 drivers/tty/n_hdlc.c | 12 +++++++++---
 1 file changed, 9 insertions(+), 3 deletions(-)

-- 
2.55.0


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

end of thread, other threads:[~2026-10-28 13:27 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-10-28 13:20 [PATCH 0/3] tty: n_hdlc: fix hangup handling Johan Hovold
2026-10-28 13:20 ` [PATCH 1/3] tty: n_hdlc: fix missing write() hangup check Johan Hovold
2026-10-28 13:27   ` sashiko-bot
2026-10-28 13:20 ` [PATCH 2/3] tty: n_hdlc: fix read() hangup race Johan Hovold
2026-10-28 13:26   ` sashiko-bot
2026-10-28 13:20 ` [PATCH 3/3] tty: n_hdlc: fix read() hangup check Johan Hovold
2026-10-28 13:26   ` sashiko-bot

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox