Skip to contentSkip to conversation

patch "cdc-acm: fix race between reset and control messaging" added to usb-linus

PATCH [email protected] 1 participant 1 message Oct 13, 2018

Subsystems (3)
lore
Share & tools
lore

[email protected]

author maintainer Applied
#0 lore raw

This is a note to let you know that I've just added the patch titled

cdc-acm: fix race between reset and control messaging

to my usb git tree which can be found at
git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb.git
in the usb-linus branch.

The patch will show up in the next release of the linux-next tree (usually sometime within the next 24 hours during the week.)

The patch will hopefully also be merged in Linus's tree for the next -rc kernel release.

If you have any questions about this process, please let me know.

Quoted 1 line

From 9397940ed812b942c520e0c25ed4b2c64d57e8b9 Mon Sep 17 00:00:00 2001

From: Oliver Neukum <[email protected]>
Date: Thu, 4 Oct 2018 15:49:06 +0200
Subject: 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.

Fixes 1aba579f3cf51 ("cdc-acm: handle read pipe errors")
Cc stable <[email protected]>
---
 drivers/usb/class/cdc-acm.c | 1 +
 1 file changed, 1 insertion(+)
drivers/usb/class/cdc-acm.c +1 -0
index bc03b0a690b4..1833912f7f5f 100644
@@ -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;
 }
Signature · 1 line
2.19.1