> From: Pete Zaitcev <[EMAIL PROTECTED]>
> To: [EMAIL PROTECTED]
> Cc: [EMAIL PROTECTED]
> Date: Mon, 16 Apr 2001 14:45:52 -0400

> 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.

I've reread that e-mail, and it was a little too much of a blanket
statement. There is no race between waitqueue_active() and wake_up()
as such. Actual race that accompanies the above code is typically
broader, it includes an outside structure (in our case that would
be a list of hubs for khubd processing).

In our case, I think, it is possible for khubd to run processing
something (waitqueue not active), then irq should mark a hub,
but it does not (because if nesting is backwards) which causes
a lost event. The solution is the same, though - remove
the check for waitqueue_active().

-- Pete

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

Reply via email to