mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Andrew Morton <akpm@linux-foundation.org>
To: Oleg Nesterov <oleg@tv-sign.ru>
Cc: "Eric W. Biederman" <ebiederm@xmission.com>,
	Davide Libenzi <davidel@xmailserver.org>,
	Ingo Molnar <mingo@elte.hu>, Roland McGrath <roland@redhat.com>,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH] change kernel threads to ignore signals instead of blocking them
Date: Mon, 23 Apr 2007 19:45:27 -0700	[thread overview]
Message-ID: <20070423194527.ab86799f.akpm@linux-foundation.org> (raw)
In-Reply-To: <20070413073116.GA1540@tv-sign.ru>

On Fri, 13 Apr 2007 11:31:16 +0400 Oleg Nesterov <oleg@tv-sign.ru> wrote:

> On top of Eric's
> 
> 	kthread-dont-depend-on-work-queues-take-2.patch
> 
> Currently kernel threads use sigprocmask(SIG_BLOCK) to protect against signals.
> This doesn't prevent the signal delivery, this only blocks signal_wake_up().
> Every "killall -33 kthreadd" means a "struct siginfo" leak.
> 
> Change kthreadd_setup() to set all handlers to SIG_IGN instead of blocking them
> (make a new helper ignore_signals() for that). If the kernel thread needs some
> signal, it should use allow_signal() anyway, and in that case it should not use
> CLONE_SIGHAND.
> 
> Note that we can't change daemonize() (should die!) in the same way, because
> it can be used along with CLONE_SIGHAND. This means that allow_signal() still
> should unblock the signal to work correctly with daemonize()ed threads.
> 
> However, disallow_signal() doesn't block the signal any longer but ignores it.
> 
> NOTE: with or without this patch the kernel threads are not protected from
> handle_stop_signal(), this seems harmless, but not good.

I'm seeing 500 zombied instances of khelper (from udev startup).  It only
happens when the utrace patches are applied.  Presumably an interaction
between utrace and one of these kthread changes.

I'll drop utrace for now.  I don't think it's getting much help from being
in -mm at present and it's getting increasingly painful to keep it merged
against all the other stuff which is happening.

Roland, I'll squirt all the extra utrace patches which I have in your direction.
Please merge them or hang on to them for later on.

      parent reply	other threads:[~2007-04-24  2:46 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-04-13  7:31 Oleg Nesterov
2007-04-13 14:13 ` Eric W. Biederman
2007-04-13 21:08   ` Andrew Morton
2007-04-13 21:36     ` Eric W. Biederman
2007-04-24  2:45 ` Andrew Morton [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=20070423194527.ab86799f.akpm@linux-foundation.org \
    --to=akpm@linux-foundation.org \
    --cc=davidel@xmailserver.org \
    --cc=ebiederm@xmission.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@elte.hu \
    --cc=oleg@tv-sign.ru \
    --cc=roland@redhat.com \
    /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

Powered by JetHome