stable.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* Patch "usbip: vudc: fix: Clear already_seen flag also for ep0" has been added to the 4.9-stable tree
@ 2017-01-03 19:57 gregkh
  0 siblings, 0 replies; only message in thread
From: gregkh @ 2017-01-03 19:57 UTC (permalink / raw)
  To: k.opasiak, gregkh, shuahkh; +Cc: stable, stable-commits


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

    usbip: vudc: fix: Clear already_seen flag also for ep0

to the 4.9-stable tree which can be found at:
    http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary

The filename of the patch is:
     usbip-vudc-fix-clear-already_seen-flag-also-for-ep0.patch
and it can be found in the queue-4.9 subdirectory.

If you, or anyone else, feels it should not be added to the stable tree,
please let <stable@vger.kernel.org> know about it.


>From 3e448e13a662fb20145916636127995cbf37eb83 Mon Sep 17 00:00:00 2001
From: Krzysztof Opasiak <k.opasiak@samsung.com>
Date: Thu, 1 Dec 2016 19:14:37 +0100
Subject: usbip: vudc: fix: Clear already_seen flag also for ep0

From: Krzysztof Opasiak <k.opasiak@samsung.com>

commit 3e448e13a662fb20145916636127995cbf37eb83 upstream.

ep_list inside gadget structure doesn't contain ep0.
It is stored separately in ep0 field.

This causes an urb hang if gadget driver decides to
delay setup handling. On host side this is visible as
timeout error when setting configuration.

This bug can be reproduced using for example any gadget
with mass storage function.

Fixes: abdb29574322 ("usbip: vudc: Add vudc_transfer")
Signed-off-by: Krzysztof Opasiak <k.opasiak@samsung.com>
Acked-by: Shuah Khan <shuahkh@osg.samsung.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

---
 drivers/usb/usbip/vudc_transfer.c |    2 ++
 1 file changed, 2 insertions(+)

--- a/drivers/usb/usbip/vudc_transfer.c
+++ b/drivers/usb/usbip/vudc_transfer.c
@@ -339,6 +339,8 @@ static void v_timer(unsigned long _vudc)
 		total = timer->frame_limit;
 	}
 
+	/* We have to clear ep0 flags separately as it's not on the list */
+	udc->ep[0].already_seen = 0;
 	list_for_each_entry(_ep, &udc->gadget.ep_list, ep_list) {
 		ep = to_vep(_ep);
 		ep->already_seen = 0;


Patches currently in stable-queue which might be from k.opasiak@samsung.com are

queue-4.9/usbip-vudc-fix-clear-already_seen-flag-also-for-ep0.patch

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2017-01-03 20:06 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-01-03 19:57 Patch "usbip: vudc: fix: Clear already_seen flag also for ep0" has been added to the 4.9-stable tree gregkh

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).