diff options
| author | Ingo Molnar <mingo@elte.hu> | 2008-11-18 21:37:07 +0100 |
|---|---|---|
| committer | Ingo Molnar <mingo@elte.hu> | 2008-11-18 21:37:07 +0100 |
| commit | 5177dc3f2b3220b2dcfcf35eb9e6ec53ee818231 (patch) | |
| tree | 29dd80a7b33426d0890aa07b5864224557c62af7 /kernel/fork.c | |
| parent | tracing: kernel/trace/trace.c: introduce missing kfree() (diff) | |
| parent | Merge branch 'for-linus' of git://git.kernel.dk/linux-2.6-block (diff) | |
| download | linux-5177dc3f2b3220b2dcfcf35eb9e6ec53ee818231.tar.gz linux-5177dc3f2b3220b2dcfcf35eb9e6ec53ee818231.zip | |
Merge branch 'linus' into tracing/urgent
Diffstat (limited to 'kernel/fork.c')
| -rw-r--r-- | kernel/fork.c | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/kernel/fork.c b/kernel/fork.c index f6083561dfe0..2a372a0e206f 100644 --- a/kernel/fork.c +++ b/kernel/fork.c @@ -40,6 +40,7 @@ #include <linux/jiffies.h> #include <linux/tracehook.h> #include <linux/futex.h> +#include <linux/compat.h> #include <linux/task_io_accounting_ops.h> #include <linux/rcupdate.h> #include <linux/ptrace.h> @@ -519,6 +520,16 @@ void mm_release(struct task_struct *tsk, struct mm_struct *mm) { struct completion *vfork_done = tsk->vfork_done; + /* Get rid of any futexes when releasing the mm */ +#ifdef CONFIG_FUTEX + if (unlikely(tsk->robust_list)) + exit_robust_list(tsk); +#ifdef CONFIG_COMPAT + if (unlikely(tsk->compat_robust_list)) + compat_exit_robust_list(tsk); +#endif +#endif + /* Get rid of any cached register state */ deactivate_mm(tsk, mm); |
