diff options
| author | Paul Mackerras <paulus@samba.org> | 2008-11-19 16:10:32 +1100 |
|---|---|---|
| committer | Paul Mackerras <paulus@samba.org> | 2008-11-19 16:10:32 +1100 |
| commit | cea555d384b85271035814c5adad23e6c7fc5d2a (patch) | |
| tree | 1181b6333a69a135293ec75f8a48c849ee32c015 /kernel/fork.c | |
| parent | 78608dd32ce46789e970d6c3c423cd668c138d6c (diff) | |
| parent | 7f0f598a0069d1ab072375965a4b69137233169c (diff) | |
| download | olio-linux-3.10-cea555d384b85271035814c5adad23e6c7fc5d2a.tar.xz olio-linux-3.10-cea555d384b85271035814c5adad23e6c7fc5d2a.zip | |
Merge branch 'linux-2.6' into next
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 f6083561dfe..2a372a0e206 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); |