signals: protect cinit from unblocked SIG_DFL signals
authorSukadev Bhattiprolu <sukadev@linux.vnet.ibm.com>
Thu, 2 Apr 2009 23:58:05 +0000 (16:58 -0700)
committerLinus Torvalds <torvalds@linux-foundation.org>
Fri, 3 Apr 2009 02:04:58 +0000 (19:04 -0700)
commit921cf9f63089c7442d44083477620132f4cea066
tree2a79eb0f7328ba2f05759d1b2c1e141bcfe4aafc
parent7978b567d31555fc828b8f945c605ad29e117b22
signals: protect cinit from unblocked SIG_DFL signals

Drop early any SIG_DFL or SIG_IGN signals to container-init from within
the same container.  But queue SIGSTOP and SIGKILL to the container-init
if they are from an ancestor container.

Blocked, fatal signals (i.e when SIG_DFL is to terminate) from within the
container can still terminate the container-init.  That will be addressed
in the next patch.

Note: To be bisect-safe, SIGNAL_UNKILLABLE will be set for container-inits
    in a follow-on patch. Until then, this patch is just a preparatory
step.

Signed-off-by: Sukadev Bhattiprolu <sukadev@linux.vnet.ibm.com>
Cc: Oleg Nesterov <oleg@tv-sign.ru>
Cc: Roland McGrath <roland@redhat.com>
Cc: "Eric W. Biederman" <ebiederm@xmission.com>
Cc: Daniel Lezcano <daniel.lezcano@free.fr>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
kernel/signal.c