From: Ingo Molnar <mingo@elte.hu>
To: Dmitry Adamushko <dmitry.adamushko@gmail.com>
Cc: Oleg Nesterov <oleg@tv-sign.ru>, Matthew Wilcox <matthew@wil.cx>,
Peter Zijlstra <a.p.zijlstra@chello.nl>,
linux-kernel@vger.kernel.org
Subject: Re: Q: down_killable() is racy? or schedule() is not right?
Date: Mon, 9 Jun 2008 13:43:16 +0200 [thread overview]
Message-ID: <20080609114316.GB5028@elte.hu> (raw)
In-Reply-To: <b647ffbd0806040409i77dc70bci6a26251ccf76d906@mail.gmail.com>
* 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
prev parent reply other threads:[~2008-06-09 11:43 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-06-03 12:33 Q: down_killable() is racy? or schedule() is not right? Oleg Nesterov
2008-06-03 12:58 ` Matthew Wilcox
2008-06-03 16:13 ` Oleg Nesterov
2008-06-04 11:09 ` Dmitry Adamushko
2008-06-09 11:43 ` Ingo Molnar [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20080609114316.GB5028@elte.hu \
--to=mingo@elte.hu \
--cc=a.p.zijlstra@chello.nl \
--cc=dmitry.adamushko@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=matthew@wil.cx \
--cc=oleg@tv-sign.ru \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox