> From: Georg Acher <[EMAIL PROTECTED]>
> To: [EMAIL PROTECTED]
> Reply-To: [EMAIL PROTECTED]
> Date: Tue, 5 Jun 2001 13:48:01 +0200
> 
> On Mon, Jun 04, 2001 at 03:46:29PM -0400, Pete Zaitcev wrote:
> <...> 
> > The urb->lock is used intelligently in uhci.c,
> > but usb-uhci does not use it at all. Everywhere
> > usb-uhci asserts urb->lock, s->urb_list_lock is
> > taken already, so urb->lock is totally redundant.
> > [Side note: process_urb is exception, but
> >   1. it violates lock order by dropping and taking urb_list_lock;
> 
> Can you be a bit more specific why you are considering the lock order as a
> holy cow? The order is unconventional, but it works and prohibits the
> simultaneous completion and unlink, there's IMHO no deadlock possibility. 

The uhci_unlink_urb_sync, uhci_unlink_urb, take urb_list_lock,
then urb->lock. The uhci_interrupt takes urb_list_lock,
then calls process_urb. The latter takes urb->lock (so far
in order), then drops urb_list_lock and attempts to retake it.
This is an ordering violation. It is from Linus' 2.4.5 tree.

I do not have a filed (not to say reproducible) bug against
our releases. The window for that deadlock is very small.

-- Pete

_______________________________________________
[EMAIL PROTECTED]
To unsubscribe, use the last form field at:
http://lists.sourceforge.net/lists/listinfo/linux-usb-devel

Reply via email to