Messages in this thread | | | Date | Mon, 9 Jun 2008 13:43:16 +0200 | From | Ingo Molnar <> | Subject | Re: Q: down_killable() is racy? or schedule() is not right? |
| |
* Dmitry Adamushko <dmitry.adamushko@gmail.com> wrote:
> > This looks racy. If SIGKILL comes in the WINDOW above, the event is > > lost. The task will wait for up() or timeout with the fatal signal > > pending, and it is not possible to wakeup it via kill() again. > > > > This is easy to fix, but I wonder if we should change schedule() > > instead. > > [ for what it's worth ] I think, you are definitely right here. > > The schedule() would be the right place to fix it. At the very least, > because otherwise callers are obliged to always check for > fatal_signal_pending(task) before scheduling with state == > TASK_KILLABLE. e.g. schedule_timeout_killable(). > > Not very nice, IMHO.
i guess we should fix this in schedule() - is there a patch i could try?
Ingo
| |