USB: cdc-acm: fix open and suspend race
authorJohan Hovold <jhovold@gmail.com>
Mon, 26 May 2014 17:23:42 +0000 (19:23 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 27 May 2014 22:04:09 +0000 (15:04 -0700)
commit703df3297fb1950b0aa53e656108eb936d3f21d9
tree009c2cf915a37af41b63c3226886cf027b162e5f
parent183a45087d126d126e8dd1d9b2602fc129dff9ad
USB: cdc-acm: fix open and suspend race

We must not do the usb_autopm_put_interface() before submitting the read
urbs or we might end up doing I/O to a suspended device.

Fixes: 088c64f81284 ("USB: cdc-acm: re-write read processing")
Signed-off-by: Johan Hovold <jhovold@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/usb/class/cdc-acm.c