aboutsummaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
authorAlan Stern <stern@rowland.harvard.edu>2009-03-09 13:44:02 -0400
committerGreg Kroah-Hartman <gregkh@suse.de>2009-03-23 15:00:12 -0700
commit2de0d862426bc8fc36b9a65622ec00f92e6c6acf (patch)
treebaa1f63737eca78584c83a7fa1897e0efbceb10e /Makefile
parentb65a739eeb3d81fdea6189b598fad50b31f840f9 (diff)
USB: usbfs: keep async URBs until the device file is closed
commit 6ff10464096540e14d7575a72c50d0316d003714 upstream. The usbfs driver manages a list of completed asynchronous URBs. But it is too eager to free the entries on this list: destroy_async() gets called whenever an interface is unbound or a device is removed, and it deallocates the outstanding struct async entries for all URBs on that interface or device. This is wrong; the user program should be able to reap an URB any time after it has completed, regardless of whether or not the interface is still bound or the device is still present. This patch (as1222) moves the code for deallocating the completed list entries from destroy_async() to usbdev_release(). The outstanding entries won't be freed until the user program has closed the device file, thereby eliminating any possibility that the remaining URBs might still be reaped. This fixes a bug in which a program can hang in the USBDEVFS_REAPURB ioctl when the device is unplugged. Reported-and-tested-by: Martin Poupe <martin.poupe@upek.com> Signed-off-by: Alan Stern <stern@rowland.harvard.edu> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'Makefile')
0 files changed, 0 insertions, 0 deletions