From e95c15ebd8a762ee379540f79a4d9f83ed3faf9b Mon Sep 17 00:00:00 2001 From: "Eric W. Biederman" Date: Tue, 26 Mar 2013 02:27:11 -0700 Subject: [PATCH] --- yaml --- r: 361878 b: refs/heads/master c: 751c644b95bb48aaa8825f0c66abbcc184d92051 h: refs/heads/master v: v3 --- [refs] | 2 +- trunk/kernel/pid_namespace.c | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/[refs] b/[refs] index bbfce197013e..03be5ec94052 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: 92f28d973cce45ef5823209aab3138eb45d8b349 +refs/heads/master: 751c644b95bb48aaa8825f0c66abbcc184d92051 diff --git a/trunk/kernel/pid_namespace.c b/trunk/kernel/pid_namespace.c index c1c3dc1c6023..bea15bdf82b0 100644 --- a/trunk/kernel/pid_namespace.c +++ b/trunk/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(); }