summaryrefslogtreecommitdiffstats
path: root/kernel/exit.c
diff options
context:
space:
mode:
authorIngo Molnar <mingo@elte.hu>2006-06-27 02:54:58 -0700
committerLinus Torvalds <torvalds@g5.osdl.org>2006-06-27 17:32:47 -0700
commitc87e2837be82df479a6bae9f155c43516d2feebc (patch)
treead6ab35f0b78f71abaa7b05185e9e3f97809c6de /kernel/exit.c
parent0cdbee9920fb37eb2dc49b860c2b28862d647adc (diff)
downloadop-kernel-dev-c87e2837be82df479a6bae9f155c43516d2feebc.zip
op-kernel-dev-c87e2837be82df479a6bae9f155c43516d2feebc.tar.gz
[PATCH] pi-futex: futex_lock_pi/futex_unlock_pi support
This adds the actual pi-futex implementation, based on rt-mutexes. [dino@in.ibm.com: fix an oops-causing race] Signed-off-by: Ingo Molnar <mingo@elte.hu> Signed-off-by: Thomas Gleixner <tglx@linutronix.de> Signed-off-by: Arjan van de Ven <arjan@linux.intel.com> Signed-off-by: Dinakar Guniguntala <dino@in.ibm.com> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'kernel/exit.c')
-rw-r--r--kernel/exit.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/kernel/exit.c b/kernel/exit.c
index 3e8a028..ab06b9f 100644
--- a/kernel/exit.c
+++ b/kernel/exit.c
@@ -926,6 +926,14 @@ fastcall NORET_TYPE void do_exit(long code)
tsk->mempolicy = NULL;
#endif
/*
+ * This must happen late, after the PID is not
+ * hashed anymore:
+ */
+ if (unlikely(!list_empty(&tsk->pi_state_list)))
+ exit_pi_state_list(tsk);
+ if (unlikely(current->pi_state_cache))
+ kfree(current->pi_state_cache);
+ /*
* If DEBUG_MUTEXES is on, make sure we are holding no locks:
*/
mutex_debug_check_no_locks_held(tsk);
OpenPOWER on IntegriCloud