Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1758048AbZJGSr7 (ORCPT ); Wed, 7 Oct 2009 14:47:59 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1754128AbZJGSr6 (ORCPT ); Wed, 7 Oct 2009 14:47:58 -0400 Received: from e32.co.us.ibm.com ([32.97.110.150]:48031 "EHLO e32.co.us.ibm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753660AbZJGSr5 (ORCPT ); Wed, 7 Oct 2009 14:47:57 -0400 Message-ID: <4ACCE21E.5030805@us.ibm.com> Date: Wed, 07 Oct 2009 11:46:54 -0700 From: Darren Hart User-Agent: Thunderbird 2.0.0.23 (X11/20090817) MIME-Version: 1.0 To: "lkml, " CC: Helge Bahmann , Thomas Gleixner , Peter Zijlstra , Ingo Molnar , Eric Dumazet , Dinakar Guniguntala , John Stultz Subject: [PATCH] futex: fix requeue_pi key imbalance Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1520 Lines: 44 futex: fix requeue_pi key imbalance From: Darren Hart 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 Signed-off-by: Darren Hart Cc: Thomas Gleixner Cc: Peter Zijlstra Cc: Ingo Molnar CC: Eric Dumazet CC: Dinakar Guniguntala CC: John Stultz --- 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 -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/