From: Oleg Nesterov <oleg-6lXkIZvqkOAvJsYlp49lxw@public.gmane.org>
To: sukadev-r/Jw6+rmf7HQT0dZR+AlfA@public.gmane.org
Cc: Containers <containers-qjLDD68F18O7TbgM5vRIOg@public.gmane.org>,
Pavel Emelianov <xemul-GEFAQzZX7r8dnm+yROfE0A@public.gmane.org>
Subject: Re: [RFC][PATCH 2/3] Signal semantics for /sbin/init
Date: Thu, 30 Aug 2007 11:00:32 +0400 [thread overview]
Message-ID: <20070830070032.GA189@tv-sign.ru> (raw)
In-Reply-To: <20070830062029.GB29340-r/Jw6+rmf7HQT0dZR+AlfA@public.gmane.org>
On 08/29, sukadev-r/Jw6+rmf7HQT0dZR+AlfA@public.gmane.org wrote:
>
> --- 2.6.23-rc3-mm1.orig/kernel/signal.c 2007-08-29 22:53:20.000000000 -0700
> +++ 2.6.23-rc3-mm1/kernel/signal.c 2007-08-29 23:10:16.000000000 -0700
> @@ -26,6 +26,7 @@
> #include <linux/freezer.h>
> #include <linux/pid_namespace.h>
> #include <linux/nsproxy.h>
> +#include <linux/hardirq.h>
>
> #include <asm/param.h>
> #include <asm/uaccess.h>
> @@ -39,11 +40,42 @@
>
> static struct kmem_cache *sigqueue_cachep;
>
> +static int sig_init_ignore(struct task_struct *tsk)
> +{
>
> -static int sig_ignored(struct task_struct *t, int sig)
> + // Currently this check is a bit racy with exec(),
> + // we can _simplify_ de_thread and close the race.
> + if (likely(!is_container_init(tsk->group_leader)))
> + return 0;
> +
> + /*
> + * If signal is from an ancestor pid namespace, do not
> + * ignore the signal.
> + */
> + if (task_ancestor_pid_ns(current, tsk))
> + return 0;
> +
This patch was intended as a fix for the current behaviour, and a preparation
for the pid_ns requirements. If possible, it should go ahead of all other
pid_ns changes, imho.
In any case, we shouldn't mix all this in one patch.
If there are no objections to this approach, I'll re-send the patch on weekend.
> @@ -2320,6 +2346,13 @@ int do_sigaction(int sig, struct k_sigac
> k = ¤t->sighand->action[sig-1];
>
> spin_lock_irq(¤t->sighand->siglock);
> +
> + if (current->signal->flags & SIGNAL_GROUP_EXIT) {
> + spin_unlock_irq(¤t->sighand->siglock);
> + /* The return value doesn't matter, SIGKILL is pending */
> + return -EINTR;
> + }
This is not needed. Please look at
http://marc.info/?l=linux-kernel&m=118763989718143
I specially removed this chunk in a separate patch, no need to re-introduce.
Oleg.
next prev parent reply other threads:[~2007-08-30 7:00 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-08-30 6:20 [RFC][PATCH 2/3] Signal semantics for /sbin/init sukadev-r/Jw6+rmf7HQT0dZR+AlfA
[not found] ` <20070830062029.GB29340-r/Jw6+rmf7HQT0dZR+AlfA@public.gmane.org>
2007-08-30 7:00 ` Oleg Nesterov [this message]
[not found] ` <20070830070032.GA189-6lXkIZvqkOAvJsYlp49lxw@public.gmane.org>
2007-08-30 7:11 ` sukadev-r/Jw6+rmf7HQT0dZR+AlfA
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=20070830070032.GA189@tv-sign.ru \
--to=oleg-6lxkizvqkoavjsylp49lxw@public.gmane.org \
--cc=containers-qjLDD68F18O7TbgM5vRIOg@public.gmane.org \
--cc=sukadev-r/Jw6+rmf7HQT0dZR+AlfA@public.gmane.org \
--cc=xemul-GEFAQzZX7r8dnm+yROfE0A@public.gmane.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