Skip to content

Commit e1c969f

Browse files
jhovoldgregkh
authored andcommitted
TTY: ircomm: fix DTR being raised on hang up
Make sure to check ASYNC_INITIALISED before raising DTR when waking up from blocked open in ircomm_tty_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> Acked-by: David S. Miller <davem@davemloft.net> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
1 parent 53a72d5 commit e1c969f

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

‎net/irda/ircomm/ircomm_tty.c‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -328,7 +328,7 @@ static int ircomm_tty_block_til_ready(struct ircomm_tty_cb *self,
328328
spin_unlock_irqrestore(&port->lock, flags);
329329

330330
while (1) {
331-
if (tty->termios.c_cflag & CBAUD)
331+
if (C_BAUD(tty) && test_bit(ASYNCB_INITIALIZED, &port->flags))
332332
tty_port_raise_dtr_rts(port);
333333

334334
set_current_state(TASK_INTERRUPTIBLE);

0 commit comments

Comments
 (0)