]> git.proxmox.com Git - mirror_ubuntu-eoan-kernel.git/commitdiff
futex: Move exit_pi_state() call to release_mm()
authorThomas Gleixner <tglx@linutronix.de>
Mon, 5 Oct 2009 16:18:03 +0000 (18:18 +0200)
committerThomas Gleixner <tglx@linutronix.de>
Tue, 6 Oct 2009 15:00:01 +0000 (17:00 +0200)
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: stable@kernel.org
Cc: Anirban Sinha <ani@anirban.org>
Cc: Peter Zijlstra <peterz@infradead.org>
kernel/exit.c
kernel/fork.c

index ae5d8660ddff4688ddee0c8179d1ef71b3909eb4..bc2b1fdfc35431f40c1050de2e403a9fe1cf74ae 100644 (file)
@@ -989,8 +989,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
index 88ef51ca84de022059dda6145568482a4ee723b2..341965b0ab1c5cbeab57482a503c6d3f33debd2f 100644 (file)
@@ -553,6 +553,8 @@ void mm_release(struct task_struct *tsk, struct mm_struct *mm)
                tsk->compat_robust_list = NULL;
        }
 #endif
+       if (unlikely(!list_empty(&tsk->pi_state_list)))
+               exit_pi_state_list(tsk);
 #endif
 
        /* Get rid of any cached register state */