Skip to content

Commit 53a72d5

Browse files
jhovoldgregkh
authored andcommitted
TTY: synclinkmp: fix DTR being raised on hang up
Make sure to check ASYNC_INITIALISED before raising DTR when waking up from blocked open in block_til_ready. Currently DTR could get raised at hang up as a blocked process would raise DTR unconditionally before checking for hang up and returning. Signed-off-by: Johan Hovold <jhovold@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
1 parent 5d8be15 commit 53a72d5

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

‎drivers/tty/synclinkmp.c‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3329,7 +3329,7 @@ static int block_til_ready(struct tty_struct *tty, struct file *filp,
33293329
port->blocked_open++;
33303330

33313331
while (1) {
3332-
if (tty->termios.c_cflag & CBAUD)
3332+
if (C_BAUD(tty) && test_bit(ASYNCB_INITIALIZED, &port->flags))
33333333
tty_port_raise_dtr_rts(port);
33343334

33353335
set_current_state(TASK_INTERRUPTIBLE);

0 commit comments

Comments
 (0)