Thread (25 messages) 25 messages, 6 authors, 2013-03-22

[PATCH] USB: EHCI: fix for leaking isochronous data

From: stern@rowland.harvard.edu (Alan Stern)
Date: 2013-03-21 21:06:56
Also in: linux-mm, lkml

On Thu, 21 Mar 2013, Soeren Moch wrote:
Now I found out what is going on here:

In itd_urb_transaction() we allocate 9 iTDs for each URB with 
number_of_packets == 64 in my case. The iTDs are added to 
sched->td_list. For a frame-aligned scheduling we need 8 iTDs, the 9th 
one is released back to the front of the streams free_list in 
iso_sched_free(). This iTD was cleared after allocation and has a frame 
number of 0 now. So for each allocation when now_frame == 0 we allocate 
from the dma_pool, not from the free_list.
Okay, that is a problem.  But it shouldn't be such a big problem,
because now_frame should not be equal to 0 very often.
 The attached patch 
invalidates the frame number in each iTD before it is sent to the 
scheduler. This fixes the problem without the need to iterate over a iTD 
list.
The patch looks okay.  However I would like to understand why the 0 
frame value messes things up so much.

Alan Stern
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help