mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Oleg Nesterov <oleg@tv-sign.ru>
To: Andrew Morton <akpm@linux-foundation.org>, Ingo Molnar <mingo@elte.hu>
Cc: Dmitry Adamushko <dmitry.adamushko@gmail.com>,
	Linus Torvalds <torvalds@linux-foundation.org>,
	Matthew Wilcox <matthew@wil.cx>,
	Peter Zijlstra <a.p.zijlstra@chello.nl>,
	Roland McGrath <roland@redhat.com>,
	linux-kernel@vger.kernel.org
Subject: [PATCH 0/3] TASK_WAKEKILL fixes
Date: Sun, 8 Jun 2008 21:20:40 +0400	[thread overview]
Message-ID: <20080608172040.GA10380@tv-sign.ru> (raw)

The second patch is just an example of how the new helper can be used outside
of schedule(), it doesn't change the behaviour.

I am not sure about the 3rd patch (it doesn't depend on the 1st patch),

	On 06/05, Oleg Nesterov wrote:
	>
	> Please note that while this bug is not likely,
	> it is _not_ theoretical. It does happen that user-space sends the unhandled
	> fatal signals to init.
	>
	> Imho, this is 2.6.26 material. Unless I missed something, of course.

Of course, I missed something. Firstly, init doesn't read files that often.
And, unlike the normal task, init can't be woken by the fatal signal unless
this signal is SIGKILL. I doubt user-space can send SIGKILL to init. So this
problem is minor.

To clarify, this patch doesn't fix the bug. We need changes in signal.c, but
unfortunately it is not as easy as I thought, it needs more thinking. For
example, we can change signal_wake_up() to check SIGNAL_UNKILLABLE before
"|= TASK_WAKEKILL", but this is a) not exactly right (exec), and b) can't
really help. The problem is that __fatal_signal_pending(init) is not right,
but signal_group_exit() needs ->signal and thus isn't useable from schedule().
Of course we can add a check into send_signal(), but this is so nasty...


                 reply	other threads:[~2008-06-08 17:20 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

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=20080608172040.GA10380@tv-sign.ru \
    --to=oleg@tv-sign.ru \
    --cc=a.p.zijlstra@chello.nl \
    --cc=akpm@linux-foundation.org \
    --cc=dmitry.adamushko@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=matthew@wil.cx \
    --cc=mingo@elte.hu \
    --cc=roland@redhat.com \
    --cc=torvalds@linux-foundation.org \
    /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

all inboxes | Powered by JetHome®