aboutsummaryrefslogtreecommitdiffstats
path: root/kernel/exit.c
diff options
context:
space:
mode:
Diffstat (limited to 'kernel/exit.c')
-rw-r--r--kernel/exit.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/kernel/exit.c b/kernel/exit.c
index b66f0d55c791..8a4d4d12e294 100644
--- a/kernel/exit.c
+++ b/kernel/exit.c
@@ -691,7 +691,13 @@ static void exit_mm(struct task_struct * tsk)
691 if (atomic_dec_and_test(&core_state->nr_threads)) 691 if (atomic_dec_and_test(&core_state->nr_threads))
692 complete(&core_state->startup); 692 complete(&core_state->startup);
693 693
694 wait_for_completion(&mm->core_done); 694 for (;;) {
695 set_task_state(tsk, TASK_UNINTERRUPTIBLE);
696 if (!self.task) /* see coredump_finish() */
697 break;
698 schedule();
699 }
700 __set_task_state(tsk, TASK_RUNNING);
695 down_read(&mm->mmap_sem); 701 down_read(&mm->mmap_sem);
696 } 702 }
697 atomic_inc(&mm->mm_count); 703 atomic_inc(&mm->mm_count);