Commit 3e82b943 authored by Thomas Gleixner's avatar Thomas Gleixner Committed by Greg Kroah-Hartman

futex: Move exit_pi_state() call to release_mm()

commit 322a2c10 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: default avatarThomas Gleixner <tglx@linutronix.de>
LKML-Reference: <new-submission>
Cc: Anirban Sinha <ani@anirban.org>
Cc: Peter Zijlstra <peterz@infradead.org>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@suse.de>
parent 9cb696b8
...@@ -987,8 +987,6 @@ NORET_TYPE void do_exit(long code) ...@@ -987,8 +987,6 @@ NORET_TYPE void do_exit(long code)
tsk->mempolicy = NULL; tsk->mempolicy = NULL;
#endif #endif
#ifdef CONFIG_FUTEX #ifdef CONFIG_FUTEX
if (unlikely(!list_empty(&tsk->pi_state_list)))
exit_pi_state_list(tsk);
if (unlikely(current->pi_state_cache)) if (unlikely(current->pi_state_cache))
kfree(current->pi_state_cache); kfree(current->pi_state_cache);
#endif #endif
......
...@@ -550,6 +550,8 @@ void mm_release(struct task_struct *tsk, struct mm_struct *mm) ...@@ -550,6 +550,8 @@ void mm_release(struct task_struct *tsk, struct mm_struct *mm)
if (unlikely(tsk->compat_robust_list)) if (unlikely(tsk->compat_robust_list))
compat_exit_robust_list(tsk); compat_exit_robust_list(tsk);
#endif #endif
if (unlikely(!list_empty(&tsk->pi_state_list)))
exit_pi_state_list(tsk);
#endif #endif
/* Get rid of any cached register state */ /* Get rid of any cached register state */
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment