Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

TTY: synclink: 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>

authored by

Johan Hovold and committed by
Greg Kroah-Hartman
78c6ccca 3ec857ff

+1 -1
+1 -1
drivers/tty/synclink.c
··· 3308 3308 port->blocked_open++; 3309 3309 3310 3310 while (1) { 3311 - if (tty->termios.c_cflag & CBAUD) 3311 + if (C_BAUD(tty) && test_bit(ASYNCB_INITIALIZED, &port->flags)) 3312 3312 tty_port_raise_dtr_rts(port); 3313 3313 3314 3314 set_current_state(TASK_INTERRUPTIBLE);