Messages in this thread | | | Date | Sun, 06 Feb 2005 18:47:42 +1100 | From | Nick Piggin <> | Subject | Re: [PATCH] fix wait_task_inactive race (was Re: Race condition in ptrace) |
| |
Nick Piggin wrote: > Ingo Molnar wrote: > >> * Nick Piggin <nickpiggin@yahoo.com.au> wrote: >> >> >>> When a task is put to sleep, it is dequeued from the runqueue >>> while it is still running. The problem is that the runqueue >>> lock can be dropped and retaken in schedule() before the task >>> actually schedules off, and wait_task_inactive did not account >>> for this. >> >> >> >> ugh. This has been the Nth time we got bitten by the fundamental >> unrobustness of non-atomic scheduling on some architectures ... >> (And i'll say the N+1th time that this is not good.) >> > > This is actually due to wake_sleeping_dependent and > dependent_sleeper dropping the runqueue lock. >
Hmph, *and* unlocked context switch architectures as you say. In fact, I'm surprised those haven't been bitten by this problem earlier.
So that makes us each half right! :)
- 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/
| |