USB: cdc_acm: Fix race condition when opening tty
authorHenry Gebhardt <gebhardt@astro.uni-tuebingen.de>
Wed, 4 Nov 2009 10:19:28 +0000 (11:19 +0100)
committerGreg Kroah-Hartman <gregkh@suse.de>
Tue, 8 Dec 2009 18:21:28 +0000 (10:21 -0800)
commitc859382e8e6c1347d0b34dc72b2c096b07113fd1
tree6db249d57b6070025390ad46bb59b68573fbcd08
parent25838ae5be73ec1b27866b49961b50153bef9fd8
USB: cdc_acm: Fix race condition when opening tty

commit 18a77b5d237a67d2c621a46f5271a3b51da1b380 upstream.

If acm_rx_tasklet() gets called before tty_port_block_til_ready()
returns, then bulk IN urbs may not be sent. This fixes it.

Signed-off-by: Henry Gebhardt <gebhardt@astro.uni-tuebingen.de>
Acked-by: Oliver Neukum <oliver@neukum.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
drivers/usb/class/cdc-acm.c