On Mon, Apr 16, 2001, Pete Zaitcev <[EMAIL PROTECTED]> wrote:
> > From: johan verrept <[EMAIL PROTECTED]>
> > To: linux-usb-devel <[EMAIL PROTECTED]>
> > CC: Johannes Erdfelt <[EMAIL PROTECTED]>
> > Date: Mon, 16 Apr 2001 18:27:46 +0200
>
> > When a hub interrupt urb completes hub_irq() checks whether
> > the waitqueue is active (if the hub thread is sleeping). If it
> > isn't sleeping, the hub never gets scheduled for event processing.
> > It causes a problem with the uml hcd. [...]
>
> I also disagree with this. Almost ALL instances of the following
> code in kernel are racy:
>
> if (waitqueue_active(&wq))
> wake_up(&wq);
>
> The right approach is to call wake_up regardless, as a rule of thumb.
At the time, I could have swore than calling wake_up on an empty queue
would oops. It probably was another bug and that masked the problem.
Ahh, the old days of when I first started coding in the kernel.
I'll fix this as well.
> > The only reason I see for this is that the list spinlock is held
> > during the entire usb_hub_events()
> > call and that would cause hub_irq() to block.
>
> The statement above is not true. This is the 2.4.3 code that I have:
Yeah, he noted that afterwards.
JE
_______________________________________________
[EMAIL PROTECTED]
To unsubscribe, use the last form field at:
http://lists.sourceforge.net/lists/listinfo/linux-usb-devel