]> www.pilppa.org Git - linux-2.6-omap-h63xx.git/commit
usb: free DMA mappings if enqueue fails
authorPete Zaitcev <zaitcev@redhat.com>
Fri, 8 Jun 2007 20:37:49 +0000 (13:37 -0700)
committerGreg Kroah-Hartman <gregkh@suse.de>
Thu, 12 Jul 2007 23:34:31 +0000 (16:34 -0700)
commit9f6a93f7bbb6d73ca0e43c000f3bbf521cd4f782
tree50b53635eb5ca5b615b33aa3a00c7f155e691484
parent60aac1ec26b960fe77bf600457bc6c06f8aa7db4
usb: free DMA mappings if enqueue fails

This patch releases DMA resources if enqueue fails in the HCD.

Linux had this bug ever since we converted from virt_to_bus for 2.4.
It is difficult to hit. A user would need a significant memory pressure
or some other unusual condition.

It was reported to me by IBM. They ran a management application for
RSA II adapters which sent Bulk requests to an Interrupt endpoint.
Submissions got rejected by HCD due to an invalid interval value
and the swiotlb pool became depleted in the matter of hours.

We fixed the invalid interval issue in devio.c separately, but this
seems to be a bug worth fixing as well.

Signed-off-by: Pete Zaitcev <zaitcev@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
drivers/usb/core/hcd.c