Skip to content

Commit

Permalink
TTY: ipwireless, use synchronous hangup
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Jiri Slaby authored and Greg Kroah-Hartman committed Apr 9, 2012
1 parent daea440 commit de3a60a
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions drivers/tty/ipwireless/tty.c
Original file line number Diff line number Diff line change
Expand Up @@ -565,11 +565,11 @@ void ipwireless_tty_free(struct ipw_tty *tty)
ttyj->closing = 1;
if (ttyj->linux_tty != NULL) {
mutex_unlock(&ttyj->ipw_tty_mutex);
tty_hangup(ttyj->linux_tty);
/* Wait till the tty_hangup has completed */
flush_work_sync(&ttyj->linux_tty->hangup_work);
tty_vhangup(ttyj->linux_tty);
/* FIXME: Exactly how is the tty object locked here
against a parallel ioctl etc */
/* FIXME2: hangup does not mean all processes
* are gone */
mutex_lock(&ttyj->ipw_tty_mutex);
}
while (ttyj->open_count)
Expand Down

0 comments on commit de3a60a

Please sign in to comment.