|
@@ -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();
|
|
|
}
|