X-Git-Url: https://git.proxmox.com/?a=blobdiff_plain;f=kernel%2Fpid_namespace.c;h=bea15bdf82b04c28d2f5d8c1a32a46b2621cb295;hb=ca0ad83da17b6ba07f9eb5902e69daac90c4fa61;hp=c1c3dc1c60233f337a01ff13587f1a5a7f57f1cd;hpb=95bc6b8461d809d7573ad8cadae3f307a472c017;p=mirror_ubuntu-zesty-kernel.git diff --git a/kernel/pid_namespace.c b/kernel/pid_namespace.c index c1c3dc1c6023..bea15bdf82b0 100644 --- a/kernel/pid_namespace.c +++ b/kernel/pid_namespace.c @@ -181,6 +181,7 @@ void zap_pid_ns_processes(struct pid_namespace *pid_ns) int nr; int rc; struct task_struct *task, *me = current; + int init_pids = thread_group_leader(me) ? 1 : 2; /* Don't allow any more processes into the pid namespace */ disable_pid_allocation(pid_ns); @@ -230,7 +231,7 @@ void zap_pid_ns_processes(struct pid_namespace *pid_ns) */ for (;;) { set_current_state(TASK_UNINTERRUPTIBLE); - if (pid_ns->nr_hashed == 1) + if (pid_ns->nr_hashed == init_pids) break; schedule(); }