aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJiri Slaby <jslaby@suse.cz>2012-04-02 07:54:31 -0400
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2012-04-09 14:30:39 -0400
commitde3a60a3436ebfd780ced830cd09880ea9c45957 (patch)
tree80f376129cc276547dcbbfd08903e612e36e61e1
parentdaea440215ae86bf9fdfe82420710ae749eb73c7 (diff)
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>
-rw-r--r--drivers/tty/ipwireless/tty.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/drivers/tty/ipwireless/tty.c b/drivers/tty/ipwireless/tty.c
index 4daf962f7055..e5396212e223 100644
--- a/drivers/tty/ipwireless/tty.c
+++ b/drivers/tty/ipwireless/tty.c
@@ -565,11 +565,11 @@ void ipwireless_tty_free(struct ipw_tty *tty)
565 ttyj->closing = 1; 565 ttyj->closing = 1;
566 if (ttyj->linux_tty != NULL) { 566 if (ttyj->linux_tty != NULL) {
567 mutex_unlock(&ttyj->ipw_tty_mutex); 567 mutex_unlock(&ttyj->ipw_tty_mutex);
568 tty_hangup(ttyj->linux_tty); 568 tty_vhangup(ttyj->linux_tty);
569 /* Wait till the tty_hangup has completed */
570 flush_work_sync(&ttyj->linux_tty->hangup_work);
571 /* FIXME: Exactly how is the tty object locked here 569 /* FIXME: Exactly how is the tty object locked here
572 against a parallel ioctl etc */ 570 against a parallel ioctl etc */
571 /* FIXME2: hangup does not mean all processes
572 * are gone */
573 mutex_lock(&ttyj->ipw_tty_mutex); 573 mutex_lock(&ttyj->ipw_tty_mutex);
574 } 574 }
575 while (ttyj->open_count) 575 while (ttyj->open_count)