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 af0d0f04585c..29c18c14812d 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>
@@ -518,6 +519,16 @@ void mm_release(struct task_struct *tsk, struct mm_struct *mm)
518{ 519{
519 struct completion *vfork_done = tsk->vfork_done; 520 struct completion *vfork_done = tsk->vfork_done;
520 521
522 /* Get rid of any futexes when releasing the mm */
523#ifdef CONFIG_FUTEX
524 if (unlikely(tsk->robust_list))
525 exit_robust_list(tsk);
526#ifdef CONFIG_COMPAT
527 if (unlikely(tsk->compat_robust_list))
528 compat_exit_robust_list(tsk);
529#endif
530#endif
531
521 /* Get rid of any cached register state */ 532 /* Get rid of any cached register state */
522 deactivate_mm(tsk, mm); 533 deactivate_mm(tsk, mm);
523 534