mirror of
https://github.com/torvalds/linux.git
synced 2026-10-23 23:51:02 +02:00
serial: abort TIOCMIWAIT on hangup
Add the missing hangup check to the TIOCMIWAIT wait loop to avoid going
back to sleep (indefinitely) after being woken on hangup.
Fixes: 1da177e4c3 ("Linux-2.6.12-rc2")
Reported-by: sashiko-bot@kernel.org
Link: https://lore.kernel.org/r/20260904115542.E20D11F00A3D@smtp.kernel.org
Cc: stable@kernel.org
Signed-off-by: Johan Hovold <johan@kernel.org>
Link: https://patch.msgid.link/20260910130816.642699-5-johan@kernel.org
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
parent
40adffec8c
commit
eb35b73e13
|
|
@ -1244,6 +1244,11 @@ static int uart_wait_modem_status(struct tty_struct *tty, struct uart_state *sta
|
|||
break;
|
||||
}
|
||||
|
||||
if (tty_io_error(tty)) {
|
||||
ret = -EIO;
|
||||
break;
|
||||
}
|
||||
|
||||
schedule();
|
||||
|
||||
/* see if a signal did it */
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user