Messages in this thread | | | Subject | RE: prepare_wait / finish_wait question | Date | Tue, 11 Nov 2003 21:19:17 -0800 | From | "Perez-Gonzalez, Inaky" <> |
| |
> From: Manfred Spraul
> Andrew Morton wrote: > >Manfred Spraul <manfred@colorfullife.com> wrote:
> >It would be neater to remove the task from the list _before_ waking it up. > >The current code in there is careful to only remove the task if the wakeup > >attempt was successful, but I have a feeling that this is unnecessary - the > >waiting task will do the right thing. One would need to think about that a > >bit more. > > Doesn't work: the woken up thread could be woken up by chance through a > signal, and then the task structure could go out of scope while wake_up > is still running - oops. Seen on s390 with sysv msg.
What about some safe wake up mechanism like get_task_struct()/__wake_up()/ put_task_struct()??
Iñaky Pérez-González -- Not speaking for Intel -- all opinions are my own (and my fault) - 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/
| |