Messages in this thread | | | Date | Tue, 13 Jan 2004 09:26:10 +1100 | Subject | Re: [I810_AUDIO] 1/x: Fix wait queue race in drain_dac | From | Herbert Xu <> |
| |
On Mon, Jan 12, 2004 at 04:48:19PM -0500, Jeff Garzik wrote: > > 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 :(
A B drain_dac() count > 0 i810_channel_interrupt() i810_update_ptr() count = 0 wake_up() set_current_state() schedule_timeout() *TIMEOUT*
> >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().
Yes, but as long as you check signal_pending at least once in each loop it does the right thing. Can you point me to a scenario where checking it right after schedule_timeout produces different behaviour than the current code?
Cheers, -- Debian GNU/Linux 3.0 is out! ( http://www.debian.org/ ) Email: Herbert Xu ~{PmV>HI~} <herbert@gondor.apana.org.au> Home Page: http://gondor.apana.org.au/~herbert/ PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt - 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/
| |