X-Git-Url: https://git.karo-electronics.de/?a=blobdiff_plain;f=kernel%2Fpid_namespace.c;h=c1c3dc1c60233f337a01ff13587f1a5a7f57f1cd;hb=d0c65252c4fdd306f2dbcf5c14181001bfdbe70e;hp=fdbd0cdf271ae4ce6ad016f8b826510865fe3600;hpb=40889e8d9fc6355980cf2bc94ef4356c10dec4ec;p=karo-tx-linux.git diff --git a/kernel/pid_namespace.c b/kernel/pid_namespace.c index fdbd0cdf271a..c1c3dc1c6023 100644 --- a/kernel/pid_namespace.c +++ b/kernel/pid_namespace.c @@ -115,6 +115,7 @@ static struct pid_namespace *create_pid_namespace(struct user_namespace *user_ns ns->level = level; ns->parent = get_pid_ns(parent_pid_ns); ns->user_ns = get_user_ns(user_ns); + ns->nr_hashed = PIDNS_HASH_ADDING; INIT_WORK(&ns->proc_work, proc_cleanup_work); set_bit(0, ns->pidmap[0].page); @@ -181,6 +182,9 @@ void zap_pid_ns_processes(struct pid_namespace *pid_ns) int rc; struct task_struct *task, *me = current; + /* Don't allow any more processes into the pid namespace */ + disable_pid_allocation(pid_ns); + /* Ignore SIGCHLD causing any terminated children to autoreap */ spin_lock_irq(&me->sighand->siglock); me->sighand->action[SIGCHLD - 1].sa.sa_handler = SIG_IGN;