All of lore.kernel.org
 help / color / mirror / Atom feed
From: Oleg Nesterov <oleg@redhat.com>
To: Andrew Morton <akpm@linux-foundation.org>
Cc: Daniel Lezcano <daniel.lezcano@free.fr>,
	Serge Hallyn <serge.hallyn@canonical.com>,
	linux-kernel@vger.kernel.org
Subject: [PATCH] pidns: reboot_pid_ns: use SEND_SIG_FORCED instead of force_sig()
Date: Fri, 13 Apr 2012 02:44:46 +0200	[thread overview]
Message-ID: <20120413004446.GA8376@redhat.com> (raw)

cf3f8921 "pidns: add reboot_pid_ns() to handle the reboot syscall"
uses force_sig() to kill the SIGNAL_UNKILLABLE cinit, this was the
only choice.

After 629d362b we can use SEND_SIG_FORCED instead, force_sig() has
the special semantics and should be avoided if possible.

Signed-off-by: Oleg Nesterov <oleg@redhat.com>

diff --git a/kernel/pid_namespace.c b/kernel/pid_namespace.c
index 57bc1fd..ef35e20 100644
--- a/kernel/pid_namespace.c
+++ b/kernel/pid_namespace.c
@@ -241,7 +241,7 @@ int reboot_pid_ns(struct pid_namespace *pid_ns, int cmd)
 	}
 
 	read_lock(&tasklist_lock);
-	force_sig(SIGKILL, pid_ns->child_reaper);
+	do_send_sig_info(SIGKILL, SEND_SIG_FORCED, pid_ns->child_reaper, true);
 	read_unlock(&tasklist_lock);
 
 	do_exit(0);


             reply	other threads:[~2012-04-13  0:45 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-04-13  0:44 Oleg Nesterov [this message]
2012-04-13 18:20 ` [PATCH] pidns: reboot_pid_ns: use SEND_SIG_FORCED instead of force_sig() Serge Hallyn
2012-04-13 19:24   ` Oleg Nesterov
2012-04-13 19:34     ` Serge Hallyn
2012-04-16 13:59     ` Serge Hallyn
2012-04-16 15:38       ` Oleg Nesterov
2012-04-16 16:24         ` Serge Hallyn
2012-04-16 21:26           ` Oleg Nesterov
2012-04-17 18:35             ` Oleg Nesterov
2012-04-18  2:29               ` Serge E. Hallyn

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=20120413004446.GA8376@redhat.com \
    --to=oleg@redhat.com \
    --cc=akpm@linux-foundation.org \
    --cc=daniel.lezcano@free.fr \
    --cc=linux-kernel@vger.kernel.org \
    --cc=serge.hallyn@canonical.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.