USB: EHCI: Fix isochronous URB leak
authorKarsten Wiese <fzuuzf@googlemail.com>
Thu, 26 Feb 2009 00:47:48 +0000 (01:47 +0100)
committerGreg Kroah-Hartman <gregkh@suse.de>
Tue, 17 Mar 2009 21:01:29 +0000 (14:01 -0700)
commit508db8c954d55ed30f870d2c24d741ba6269d13c
treeaed956a468d6d2dcd6103554f535aed978eec4fe
parent9ea19b82f3126da4e47d6b94563a3c2cd586f6e2
USB: EHCI: Fix isochronous URB leak

ehci-hcd uses usb_get_urb() and usb_put_urb() in an unbalanced way causing
isochronous URB's kref.counts incrementing once per usb_submit_urb() call.
The culprit is *usb being set to NULL when usb_put_urb() is called after URB
is given back.
Due to other fixes there is no need for ehci-hcd to deal with usb_get_urb()
nor usb_put_urb() anymore, so patch removes their usages in ehci-hcd.
Patch also makes ehci_to_hcd(ehci)->self.bandwidth_allocated adjust, if a
stream finishes.

Signed-off-by: Karsten Wiese <fzu@wemgehoertderstaat.de>
Cc: David Brownell <david-b@pacbell.net>
Cc: stable <stable@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
drivers/usb/host/ehci-sched.c