mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-29 19:21:31 -04:00
cdc-acm: fix race between reset and control messaging
If a device splits up a control message and a reset() happens
between the parts, the message is lost and already recieved parts
must be dropped.
Signed-off-by: Oliver Neukum <[email protected]>
Fixes: 1aba579f3c ("cdc-acm: handle read pipe errors")
Cc: stable <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
This commit is contained in:
parent
81f7567c51
commit
9397940ed8
1 changed files with 1 additions and 0 deletions
|
|
@ -1642,6 +1642,7 @@ static int acm_pre_reset(struct usb_interface *intf)
|
|||
struct acm *acm = usb_get_intfdata(intf);
|
||||
|
||||
clear_bit(EVENT_RX_STALL, &acm->flags);
|
||||
acm->nb_index = 0; /* pending control transfers are lost */
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue