aboutsummaryrefslogtreecommitdiffstats
path: root/kernel/fork.c
diff options
context:
space:
mode:
Diffstat (limited to 'kernel/fork.c')
-rw-r--r--kernel/fork.c11
1 files changed, 11 insertions, 0 deletions
diff --git a/kernel/fork.c b/kernel/fork.c
index 0837d0deee5f..ac62f43ee430 100644
--- a/kernel/fork.c
+++ b/kernel/fork.c
@@ -40,6 +40,7 @@
40#include <linux/jiffies.h> 40#include <linux/jiffies.h>
41#include <linux/tracehook.h> 41#include <linux/tracehook.h>
42#include <linux/futex.h> 42#include <linux/futex.h>
43#include <linux/compat.h>
43#include <linux/task_io_accounting_ops.h> 44#include <linux/task_io_accounting_ops.h>
44#include <linux/rcupdate.h> 45#include <linux/rcupdate.h>
45#include <linux/ptrace.h> 46#include <linux/ptrace.h>
@@ -521,6 +522,16 @@ void mm_release(struct task_struct *tsk, struct mm_struct *mm)
521{ 522{
522 struct completion *vfork_done = tsk->vfork_done; 523 struct completion *vfork_done = tsk->vfork_done;
523 524
525 /* Get rid of any futexes when releasing the mm */
526#ifdef CONFIG_FUTEX
527 if (unlikely(tsk->robust_list))
528 exit_robust_list(tsk);
529#ifdef CONFIG_COMPAT
530 if (unlikely(tsk->compat_robust_list))
531 compat_exit_robust_list(tsk);
532#endif
533#endif
534
524 /* Get rid of any cached register state */ 535 /* Get rid of any cached register state */
525 deactivate_mm(tsk, mm); 536 deactivate_mm(tsk, mm);
526 537