diff options
Diffstat (limited to 'kernel/fork.c')
-rw-r--r-- | kernel/fork.c | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/kernel/fork.c b/kernel/fork.c index 017fb23d5983..2254fbf23567 100644 --- a/kernel/fork.c +++ b/kernel/fork.c | |||
@@ -787,9 +787,6 @@ void mm_release(struct task_struct *tsk, struct mm_struct *mm) | |||
787 | /* Get rid of any cached register state */ | 787 | /* Get rid of any cached register state */ |
788 | deactivate_mm(tsk, mm); | 788 | deactivate_mm(tsk, mm); |
789 | 789 | ||
790 | if (tsk->vfork_done) | ||
791 | complete_vfork_done(tsk); | ||
792 | |||
793 | /* | 790 | /* |
794 | * If we're exiting normally, clear a user-space tid field if | 791 | * If we're exiting normally, clear a user-space tid field if |
795 | * requested. We leave this alone when dying by signal, to leave | 792 | * requested. We leave this alone when dying by signal, to leave |
@@ -810,6 +807,13 @@ void mm_release(struct task_struct *tsk, struct mm_struct *mm) | |||
810 | } | 807 | } |
811 | tsk->clear_child_tid = NULL; | 808 | tsk->clear_child_tid = NULL; |
812 | } | 809 | } |
810 | |||
811 | /* | ||
812 | * All done, finally we can wake up parent and return this mm to him. | ||
813 | * Also kthread_stop() uses this completion for synchronization. | ||
814 | */ | ||
815 | if (tsk->vfork_done) | ||
816 | complete_vfork_done(tsk); | ||
813 | } | 817 | } |
814 | 818 | ||
815 | /* | 819 | /* |