From: Jiri Slaby Date: Mon, 2 Apr 2012 11:54:31 +0000 (+0200) Subject: TTY: ipwireless, use synchronous hangup X-Git-Tag: firefly_0821_release~3680^2~2824^2~30^2~42 X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=de3a60a3436ebfd780ced830cd09880ea9c45957;p=firefly-linux-kernel-4.4.55.git 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 Cc: Jiri Kosina Acked-by: David Sterba Signed-off-by: Greg Kroah-Hartman --- 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) 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)