Bad patch. I've seen oopses when the completion routine
frees the URB, and then usb-uhci tries to access that URB
in order to spin_unlock(&urb->lock) ... it's nulled so that
the HCD knows never to access urbs after they have been
given back to the device driver.
Note that the FILL_*_URB() macros always re-init the
spinlock, so the "reuse this URB" path won't care if the
HC didn't drop the lock.
- Dave
----- Original Message -----
From: "Dan Streetman" <[EMAIL PROTECTED]>
To: "Linux-USB development mailing list" <[EMAIL PROTECTED]>;
"Johannes Erdfelt"
<[EMAIL PROTECTED]>; "Georg Acher" <[EMAIL PROTECTED]>
Sent: Thursday, May 17, 2001 8:19 PM
Subject: [linux-usb-devel] [patch] usb-uhci held spinlock
>
> I think that holding the urb's spinlock is bad if that urb
> will ever be used again; although maybe I'm missing something...
> I'm also not clear on why urb is being NULLed...
>
>
> --- 2.4.4-clean/drivers/usb/usb-uhci.c Fri Apr 27 18:13:07 2001
> +++ linux/drivers/usb/usb-uhci.c Thu May 17 23:16:19 2001
> @@ -2639,14 +2639,12 @@
> if (is_ring && !was_unlinked && !contains_killed) {
> urb->dev=usb_dev;
> uhci_submit_urb (urb);
> - } else
> - urb = 0;
> + }
> spin_lock(&s->urb_list_lock);
> }
>
> usb_dec_dev_use (usb_dev);
> - if (urb)
> - spin_unlock(&urb->lock);
> + spin_unlock(&urb->lock);
> }
> }
>
>
>
> _______________________________________________
> [EMAIL PROTECTED]
> To unsubscribe, use the last form field at:
> http://lists.sourceforge.net/lists/listinfo/linux-usb-devel
_______________________________________________
[EMAIL PROTECTED]
To unsubscribe, use the last form field at:
http://lists.sourceforge.net/lists/listinfo/linux-usb-devel