From: Alan Stern Date: Wed, 30 Jan 2013 21:35:02 +0000 (-0500) Subject: USB: EHCI: fix for leaking isochronous data X-Git-Tag: v3.7.7~1 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=d7da09805d410e24ea7d79990e9a2055e19e267e;p=thirdparty%2Fkernel%2Fstable.git USB: EHCI: fix for leaking isochronous data commit b09a61cc0bc2a7151f4ab652489e85253d5d0175 upstream. This patch (as1653) fixes a bug in ehci-hcd. Unlike iTD entries, an siTD entry in the periodic schedule may not complete until the frame after the one it belongs to. Consequently, when scanning the periodic schedule it is necessary to start with the frame _preceding_ the one where the previous scan ended. Not doing this properly can result in memory leaks and failures to complete isochronous URBs. Signed-off-by: Alan Stern Reported-and-tested-by: Andy Leiserson Signed-off-by: Greg Kroah-Hartman --- diff --git a/drivers/usb/host/ehci-sched.c b/drivers/usb/host/ehci-sched.c index 838e5716e41ab..c41063dc6a24f 100644 --- a/drivers/usb/host/ehci-sched.c +++ b/drivers/usb/host/ehci-sched.c @@ -2336,5 +2336,5 @@ restart: break; frame = (frame + 1) & fmask; } - ehci->next_frame = now_frame; + ehci->next_frame = (frame - 1) & fmask; }