diff options
author | Thomas Gleixner <tglx@linutronix.de> | 2009-10-05 18:18:03 +0200 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@suse.de> | 2009-10-12 12:40:11 -0700 |
commit | 3e82b94373aeccc3624e228e40a60749f70deaf8 (patch) | |
tree | 0ccba05f2ae530ae3c097be1668683c81684580c | |
parent | 9cb696b8f6a4b034d2a0323aaf81a878c60199a5 (diff) | |
download | lwn-3e82b94373aeccc3624e228e40a60749f70deaf8.tar.gz lwn-3e82b94373aeccc3624e228e40a60749f70deaf8.zip |
futex: Move exit_pi_state() call to release_mm()
commit 322a2c100a8998158445599ea437fb556aa95b11 upstream.
exit_pi_state() is called from do_exit() but not from do_execve().
Move it to release_mm() so it gets called from do_execve() as well.
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
LKML-Reference: <new-submission>
Cc: Anirban Sinha <ani@anirban.org>
Cc: Peter Zijlstra <peterz@infradead.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
-rw-r--r-- | kernel/exit.c | 2 | ||||
-rw-r--r-- | kernel/fork.c | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/kernel/exit.c b/kernel/exit.c index 869dc221733e..b8606f0f22e4 100644 --- a/kernel/exit.c +++ b/kernel/exit.c @@ -987,8 +987,6 @@ NORET_TYPE void do_exit(long code) tsk->mempolicy = NULL; #endif #ifdef CONFIG_FUTEX - if (unlikely(!list_empty(&tsk->pi_state_list))) - exit_pi_state_list(tsk); if (unlikely(current->pi_state_cache)) kfree(current->pi_state_cache); #endif diff --git a/kernel/fork.c b/kernel/fork.c index e6c04d462ab2..edd0b2dfbce8 100644 --- a/kernel/fork.c +++ b/kernel/fork.c @@ -550,6 +550,8 @@ void mm_release(struct task_struct *tsk, struct mm_struct *mm) if (unlikely(tsk->compat_robust_list)) compat_exit_robust_list(tsk); #endif + if (unlikely(!list_empty(&tsk->pi_state_list))) + exit_pi_state_list(tsk); #endif /* Get rid of any cached register state */ |