Skip to content

Commit

Permalink
TTY: wake up processes last at hangup
Browse files Browse the repository at this point in the history
Move wake up of processes on blocked-open and modem-status wait queues
to after port shutdown at hangup.

This way the woken up processes can use the ASYNC_INITIALIZED flag to
detect port shutdown.

Note that this is the order currently used by serial-core.

Signed-off-by: Johan Hovold <jhovold@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
  • Loading branch information
Johan Hovold authored and Greg Kroah-Hartman committed Mar 18, 2013
1 parent 8bde965 commit 31ca020
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/tty/tty_port.c
Original file line number Diff line number Diff line change
Expand Up @@ -231,9 +231,9 @@ void tty_port_hangup(struct tty_port *port)
}
port->tty = NULL;
spin_unlock_irqrestore(&port->lock, flags);
tty_port_shutdown(port);
wake_up_interruptible(&port->open_wait);
wake_up_interruptible(&port->delta_msr_wait);
tty_port_shutdown(port);
}
EXPORT_SYMBOL(tty_port_hangup);

Expand Down

0 comments on commit 31ca020

Please sign in to comment.