2
0
mirror of https://github.com/edk2-porting/linux-next.git synced 2024-12-19 10:44:14 +08:00

TTY: ipwireless, use synchronous hangup

Do not touch internal workqueue. Call tty_vhangup instead.

Note that finished hangup does not necessarily mean that all processes
are dead. Especially when the tty is a console. The code assumes that
right now.

Signed-off-by: Jiri Slaby <jslaby@suse.cz>
Cc: Jiri Kosina <jkosina@suse.cz>
Acked-by: David Sterba <dsterba@suse.cz>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
Jiri Slaby 2012-04-02 13:54:31 +02:00 committed by Greg Kroah-Hartman
parent daea440215
commit de3a60a343

View File

@ -565,11 +565,11 @@ void ipwireless_tty_free(struct ipw_tty *tty)
ttyj->closing = 1; ttyj->closing = 1;
if (ttyj->linux_tty != NULL) { if (ttyj->linux_tty != NULL) {
mutex_unlock(&ttyj->ipw_tty_mutex); mutex_unlock(&ttyj->ipw_tty_mutex);
tty_hangup(ttyj->linux_tty); tty_vhangup(ttyj->linux_tty);
/* Wait till the tty_hangup has completed */
flush_work_sync(&ttyj->linux_tty->hangup_work);
/* FIXME: Exactly how is the tty object locked here /* FIXME: Exactly how is the tty object locked here
against a parallel ioctl etc */ against a parallel ioctl etc */
/* FIXME2: hangup does not mean all processes
* are gone */
mutex_lock(&ttyj->ipw_tty_mutex); mutex_lock(&ttyj->ipw_tty_mutex);
} }
while (ttyj->open_count) while (ttyj->open_count)