diff options
| author | Thomas Gleixner <tglx@linutronix.de> | 2012-07-15 10:24:53 +0200 |
|---|---|---|
| committer | Thomas Gleixner <tglx@linutronix.de> | 2012-07-15 10:24:53 +0200 |
| commit | e8b9dd7e2471b1274e3be719fcc385e0a710e46f (patch) | |
| tree | 030d7ce20e8f8767d9423f78c102aba089eec372 /kernel/pid_namespace.c | |
| parent | 924412f66fd9d21212e560a93792b0b607d46c6e (diff) | |
| parent | 6b1859dba01c7d512b72d77e3fd7da8354235189 (diff) | |
| download | linux-next-e8b9dd7e2471b1274e3be719fcc385e0a710e46f.tar.gz linux-next-e8b9dd7e2471b1274e3be719fcc385e0a710e46f.zip | |
Merge branch 'timers/urgent' into timers/core
Reason: Update to upstream changes to avoid further conflicts.
Fixup a trivial merge conflict in kernel/time/tick-sched.c
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Diffstat (limited to 'kernel/pid_namespace.c')
| -rw-r--r-- | kernel/pid_namespace.c | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/kernel/pid_namespace.c b/kernel/pid_namespace.c index 16b20e38c4a1..b3c7fd554250 100644 --- a/kernel/pid_namespace.c +++ b/kernel/pid_namespace.c @@ -184,11 +184,31 @@ void zap_pid_ns_processes(struct pid_namespace *pid_ns) } read_unlock(&tasklist_lock); + /* Firstly reap the EXIT_ZOMBIE children we may have. */ do { clear_thread_flag(TIF_SIGPENDING); rc = sys_wait4(-1, NULL, __WALL, NULL); } while (rc != -ECHILD); + /* + * sys_wait4() above can't reap the TASK_DEAD children. + * Make sure they all go away, see __unhash_process(). + */ + for (;;) { + bool need_wait = false; + + read_lock(&tasklist_lock); + if (!list_empty(¤t->children)) { + __set_current_state(TASK_UNINTERRUPTIBLE); + need_wait = true; + } + read_unlock(&tasklist_lock); + + if (!need_wait) + break; + schedule(); + } + if (pid_ns->reboot) current->signal->group_exit_code = pid_ns->reboot; |
