lkml.org 
[lkml]   [2009]   [Oct]   [7]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Date
From
Subject[PATCH] futex: fix requeue_pi key imbalance
futex: fix requeue_pi key imbalance

From: Darren Hart <dvhltc@us.ibm.com>

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: Thomas Gleixner <tglx@linutronix.de>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Ingo Molnar <mingo@elte.hu>
CC: Eric Dumazet <eric.dumazet@gmail.com>
CC: Dinakar Guniguntala <dino@in.ibm.com>
CC: John Stultz <johnstul@us.ibm.com>
---

kernel/futex.c | 1 -
1 files changed, 0 insertions(+), 1 deletions(-)


Index: linux-2.6.git/kernel/futex.c
===================================================================
--- linux-2.6.git.orig/kernel/futex.c
+++ linux-2.6.git/kernel/futex.c
@@ -2117,7 +2117,6 @@ int handle_early_requeue_pi_wakeup(struc
* Unqueue the futex_q and determine which it was.
*/
plist_del(&q->list, &q->list.plist);
- drop_futex_key_refs(&q->key);

if (timeout && !timeout->task)
ret = -ETIMEDOUT;
--
Darren Hart
IBM Linux Technology Center
Real-Time Linux Team

\
 
 \ /
  Last update: 2009-10-07 20:57    [W:0.148 / U:0.080 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site