Hi Oliver,

Good spot. Thanks.
The control transfers are not used very often so this bug remained 
hidden for so long. This patch hopefully fix it plus one more.

Comments?


later,
Petko


--- Oliver Neukum <[EMAIL PROTECTED]> wrote:
> Hi Petkan, hi list,
> 
> I believe there's a race that may lead to a lost
> wake_up between 
> get_registers() and cousins in 
> 
>       while ( pegasus->flags & ETH_REGS_CHANGED ) {
>               pegasus->flags |= CTRL_URB_SLEEP;
>               interruptible_sleep_on( &pegasus->ctrl_wait );
>       }
> 
> with the following lines from ctrl_callback
> 
>       if ( pegasus->flags & CTRL_URB_SLEEP ) {
>               pegasus->flags &= ~CTRL_URB_SLEEP;
>               wake_up_interruptible( &pegasus->ctrl_wait );
>       }
> 
> To be precise, if the interrupt happens exactly
> 
>       while ( pegasus->flags & ETH_REGS_CHANGED ) {
>               pegasus->flags |= CTRL_URB_SLEEP;
> ----------> here
>               interruptible_sleep_on( &pegasus->ctrl_wait );
> 
> ,you are screwed.
> 
>       HTH
>               Oliver

pegasus.c.diff

Reply via email to