mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-28 18:51:56 -04:00
USB: cdc_acm: Fix race condition when opening tty
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 <[email protected]> Acked-by: Oliver Neukum <[email protected]> Cc: stable <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
This commit is contained in:
parent
a1f17a872b
commit
18a77b5d23
1 changed files with 1 additions and 1 deletions
|
|
@ -609,9 +609,9 @@ static int acm_tty_open(struct tty_struct *tty, struct file *filp)
|
|||
|
||||
acm->throttle = 0;
|
||||
|
||||
tasklet_schedule(&acm->urb_task);
|
||||
set_bit(ASYNCB_INITIALIZED, &acm->port.flags);
|
||||
rv = tty_port_block_til_ready(&acm->port, tty, filp);
|
||||
tasklet_schedule(&acm->urb_task);
|
||||
done:
|
||||
mutex_unlock(&acm->mutex);
|
||||
err_out:
|
||||
|
|
|
|||
Loading…
Reference in a new issue