lkml.org 
[lkml]   [2004]   [Jan]   [12]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [I810_AUDIO] 1/x: Fix wait queue race in drain_dac
Herbert Xu wrote:
> On Sun, Jan 11, 2004 at 04:00:41PM -0500, Jeff Garzik wrote:
>
>>Thanks much for these i810_audio patches. I've been meaning to review
>>them in-depth for some time.
>
>
> Thanks a lot for reviewing them.
>
>
>>Could you be kind and "spell out" the patch-1 race for me?
>
>
> Prior to the patch, if an interrupt occured between the count check
> and the setting of the current state the wait will timeout instead
> of waking up immediately.

hmmm, I'll have to think on this one a bit. You are described observed
behavior here... can you go a bit deeper, and describe what two code
paths are racing? I think I might a _different_ race in the code we're
looking at, but I do not yet see the race you are describing :(


>>Also, it seems to me that you would want to check for signal_pending()
>>(a) just after the schedule_timeout(), and
>>(b) -after- testing the 'signals_allowed' variable ;-)
>
>
> schedule() already checks for signals.

Well -- A signal won't be pending until after you call
schedule_timeout() ;-) A signal, particularly SIGINT, might even occur
_during_ the schedule_timeout().

Jeff



-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2005-03-22 14:00    [W:0.026 / U:2.448 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site