Re: [PATCH v2] xhci: fix usb3 streams

2013-10-17 Thread Sarah Sharp
The more I look at this patch, the more I hate it for the failure cases it doesn't cover. What happens if the radix_tree_insert fails in the middle of adding a set of ring segments? We leave those segments that were inserted in the radix tree, which is a problem, since we could allocate those seg

Re: [PATCH v2] xhci: fix usb3 streams

2013-10-17 Thread Alan Stern
On Wed, 16 Oct 2013, Sarah Sharp wrote: > > > xhci maintains a radix tree for each stream endpoint because it must > > > be able to map a trb address to the stream ring. Each ring segment > > > must be added to the ring for this to work. Currently xhci sticks > > > only the first segment of each

Re: [PATCH v2] xhci: fix usb3 streams

2013-10-16 Thread Sarah Sharp
On Tue, Oct 15, 2013 at 10:53:57AM -0400, Alan Stern wrote: > On Mon, 14 Oct 2013, Gerd Hoffmann wrote: > > > Gerd, Hans, any objections to this updated patch? The warning is fixed > > with it. > > > > The patch probably still needs to address the case where the ring > > expansion fails because

Re: [PATCH v2] xhci: fix usb3 streams

2013-10-15 Thread Alan Stern
On Mon, 14 Oct 2013, Gerd Hoffmann wrote: > Gerd, Hans, any objections to this updated patch? The warning is fixed > with it. > > The patch probably still needs to address the case where the ring > expansion fails because we can't insert the new segments into the radix > tree. The patch should

Re: [PATCH v2] xhci: fix usb3 streams

2013-10-14 Thread Hans de Goede
Hi Sarah, On 10/15/2013 03:54 AM, Gerd Hoffmann wrote: Gerd, Hans, any objections to this updated patch? The warning is fixed with it. No objections, looks good to me. The patch probably still needs to address the case where the ring expansion fails because we can't insert the new segments

[PATCH v2] xhci: fix usb3 streams

2013-10-14 Thread Gerd Hoffmann
Gerd, Hans, any objections to this updated patch? The warning is fixed with it. The patch probably still needs to address the case where the ring expansion fails because we can't insert the new segments into the radix tree. The patch should probably allocate the segments, attempt to add them to