tty: USB hangup is racy
commit08f30ff9811e59c08d1cee043ce55b2e862efe58
authorAlan Cox <alan@linux.intel.com>
Sat, 19 Sep 2009 20:13:23 +0000 (19 13:13 -0700)
committerGreg Kroah-Hartman <gregkh@suse.de>
Mon, 5 Oct 2009 16:32:34 +0000 (5 09:32 -0700)
tree7adc35cbdcbb9759a93d06d8d43f5e44848ac3ee
parent4260dc792fabfd20c8644fa9414b2ae48372365f
tty: USB hangup is racy

commit d2b391822a11302add9e46476f3da4e18e6de84c upstream.

The USB layer uses tty_hangup to deal with unplugs of the physical hardware
(analogous to loss of carrier) and then frees the resources. However the
tty_hangup is asynchronous. As the hangup can sleep we can use tty_vhangup
which is the non async version to avoid freeing resources too early.

Signed-off-by: Alan Cox <alan@linux.intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
drivers/usb/serial/usb-serial.c