提交 0fbc26a6 编写于 作者: S Sukadev Bhattiprolu 提交者: Linus Torvalds

pid namespaces: allow signalling cgroup-init

Only the global-init process must be special - any other cgroup-init
process must be killable to prevent run-away processes in the system.

TODO: 	Ideally we should allow killing the cgroup-init only from parent
	cgroup and prevent it being killed from within the cgroup.
	But that is a more complex change and will be addressed by a follow-on
	patch. For now allow the cgroup-init to be terminated by any process
	with sufficient privileges.
Signed-off-by: NSukadev Bhattiprolu <sukadev@us.ibm.com>
Acked-by: NPavel Emelyanov <xemul@openvz.org>
Cc: Oleg Nesterov <oleg@tv-sign.ru>
Cc: Sukadev Bhattiprolu <sukadev@us.ibm.com>
Cc: Paul Menage <menage@google.com>
Cc: "Eric W. Biederman" <ebiederm@xmission.com>
Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
上级 c9c5d922
......@@ -1835,11 +1835,9 @@ int get_signal_to_deliver(siginfo_t *info, struct k_sigaction *return_ka,
continue;
/*
* Init of a pid space gets no signals it doesn't want from
* within that pid space. It can of course get signals from
* its parent pid space.
* Global init gets no signals it doesn't want.
*/
if (current == task_child_reaper(current))
if (is_global_init(current))
continue;
if (sig_kernel_stop(signr)) {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册