Skip to content
Snippets Groups Projects
Commit 31ca020b authored by Johan Hovold's avatar Johan Hovold Committed by Greg Kroah-Hartman
Browse files

TTY: wake up processes last at hangup


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: default avatarJohan Hovold <jhovold@gmail.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 8bde9658
No related branches found
No related tags found
No related merge requests found
...@@ -231,9 +231,9 @@ void tty_port_hangup(struct tty_port *port) ...@@ -231,9 +231,9 @@ void tty_port_hangup(struct tty_port *port)
} }
port->tty = NULL; port->tty = NULL;
spin_unlock_irqrestore(&port->lock, flags); spin_unlock_irqrestore(&port->lock, flags);
tty_port_shutdown(port);
wake_up_interruptible(&port->open_wait); wake_up_interruptible(&port->open_wait);
wake_up_interruptible(&port->delta_msr_wait); wake_up_interruptible(&port->delta_msr_wait);
tty_port_shutdown(port);
} }
EXPORT_SYMBOL(tty_port_hangup); EXPORT_SYMBOL(tty_port_hangup);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment