Skip to content

Commit 0fbc26a

Browse files
Sukadev BhattiproluLinus Torvalds
authored andcommitted
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: Sukadev Bhattiprolu <[email protected]> Acked-by: Pavel Emelyanov <[email protected]> Cc: Oleg Nesterov <[email protected]> Cc: Sukadev Bhattiprolu <[email protected]> Cc: Paul Menage <[email protected]> Cc: "Eric W. Biederman" <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
1 parent c9c5d92 commit 0fbc26a

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

kernel/signal.c

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1835,11 +1835,9 @@ int get_signal_to_deliver(siginfo_t *info, struct k_sigaction *return_ka,
18351835
continue;
18361836

18371837
/*
1838-
* Init of a pid space gets no signals it doesn't want from
1839-
* within that pid space. It can of course get signals from
1840-
* its parent pid space.
1838+
* Global init gets no signals it doesn't want.
18411839
*/
1842-
if (current == task_child_reaper(current))
1840+
if (is_global_init(current))
18431841
continue;
18441842

18451843
if (sig_kernel_stop(signr)) {

0 commit comments

Comments
 (0)