|
@@ -787,9 +787,6 @@ void mm_release(struct task_struct *tsk, struct mm_struct *mm)
|
|
|
/* Get rid of any cached register state */
|
|
|
deactivate_mm(tsk, mm);
|
|
|
|
|
|
- if (tsk->vfork_done)
|
|
|
- complete_vfork_done(tsk);
|
|
|
-
|
|
|
/*
|
|
|
* If we're exiting normally, clear a user-space tid field if
|
|
|
* 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)
|
|
|
}
|
|
|
tsk->clear_child_tid = NULL;
|
|
|
}
|
|
|
+
|
|
|
+ /*
|
|
|
+ * All done, finally we can wake up parent and return this mm to him.
|
|
|
+ * Also kthread_stop() uses this completion for synchronization.
|
|
|
+ */
|
|
|
+ if (tsk->vfork_done)
|
|
|
+ complete_vfork_done(tsk);
|
|
|
}
|
|
|
|
|
|
/*
|