]> err.no Git - linux-2.6/commitdiff
USB: Deref URB after usbmon is done with it
authorPete Zaitcev <zaitcev@redhat.com>
Sat, 12 May 2007 05:00:29 +0000 (22:00 -0700)
committerGreg Kroah-Hartman <gregkh@suse.de>
Wed, 23 May 2007 06:45:49 +0000 (23:45 -0700)
I haven't personally run across an oops because of this, but I feel safer
with this fix in place.

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

index 9ad2970a095d94dfe96fc6dd6146e428ef2783e0..e277258df3827d3a1a6a1b6c7532389346af6d72 100644 (file)
@@ -1018,8 +1018,8 @@ done:
                atomic_dec (&urb->use_count);
                if (urb->reject)
                        wake_up (&usb_kill_urb_queue);
-               usb_put_urb (urb);
                usbmon_urb_submit_error(&hcd->self, urb, status);
+               usb_put_urb (urb);
        }
        return status;
 }