aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDarren Hart <dvhltc@us.ibm.com>2009-10-07 14:46:54 -0400
committerThomas Gleixner <tglx@linutronix.de>2009-10-07 15:22:03 -0400
commitda085681014fb43d67d9bf6d14bc068e9254bd49 (patch)
treea044706690151ad641ce8beee4d798248b962230
parentf8d1e548931cfa5ea9a082e020c2a47d27e5d793 (diff)
futex: fix requeue_pi key imbalance
If futex_wait_requeue_pi() wakes prior to requeue, we drop the reference to the source futex_key twice, once in handle_early_requeue_pi_wakeup() and once on our way out. Remove the drop from the handle_early_requeue_pi_wakeup() and keep the get/drops together in futex_wait_requeue_pi(). Reported-by: Helge Bahmann <hcb@chaoticmind.net> Signed-off-by: Darren Hart <dvhltc@us.ibm.com> Cc: Helge Bahmann <hcb@chaoticmind.net> Cc: Peter Zijlstra <peterz@infradead.org> Cc: Eric Dumazet <eric.dumazet@gmail.com> Cc: Dinakar Guniguntala <dino@in.ibm.com> Cc: John Stultz <johnstul@us.ibm.com> Cc: stable-2.6.31 <stable@kernel.org> LKML-Reference: <4ACCE21E.5030805@us.ibm.com> Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
-rw-r--r--kernel/futex.c1
1 files changed, 0 insertions, 1 deletions
diff --git a/kernel/futex.c b/kernel/futex.c
index 1e176f3ab26c..c3bb2fce11ba 100644
--- a/kernel/futex.c
+++ b/kernel/futex.c
@@ -2111,7 +2111,6 @@ int handle_early_requeue_pi_wakeup(struct futex_hash_bucket *hb,
2111 * Unqueue the futex_q and determine which it was. 2111 * Unqueue the futex_q and determine which it was.
2112 */ 2112 */
2113 plist_del(&q->list, &q->list.plist); 2113 plist_del(&q->list, &q->list.plist);
2114 drop_futex_key_refs(&q->key);
2115 2114
2116 if (timeout && !timeout->task) 2115 if (timeout && !timeout->task)
2117 ret = -ETIMEDOUT; 2116 ret = -ETIMEDOUT;