Re: [I810_AUDIO] 1/x: Fix wait queue race in drain_dac
From: Jeff Garzik
Date: Mon Jan 12 2004 - 16:49:45 EST
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@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/