From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail.linuxfoundation.org ([140.211.169.12]:49165 "EHLO mail.linuxfoundation.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753605AbcBXDd1 (ORCPT ); Tue, 23 Feb 2016 22:33:27 -0500 Subject: Patch "futex: Drop refcount if requeue_pi() acquired the rtmutex" has been added to the 3.10-stable tree To: tglx@linutronix.de, Andy_Lowe@mentor.com, darren@dvhart.com, dave@stgolabs.net, gregkh@linuxfoundation.org, peterz@infradead.org Cc: , From: Date: Tue, 23 Feb 2016 19:23:04 -0800 Message-ID: <14562841848934@kroah.com> MIME-Version: 1.0 Content-Type: text/plain; charset=ANSI_X3.4-1968 Content-Transfer-Encoding: 8bit Sender: stable-owner@vger.kernel.org List-ID: This is a note to let you know that I've just added the patch titled futex: Drop refcount if requeue_pi() acquired the rtmutex to the 3.10-stable tree which can be found at: http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary The filename of the patch is: futex-drop-refcount-if-requeue_pi-acquired-the-rtmutex.patch and it can be found in the queue-3.10 subdirectory. If you, or anyone else, feels it should not be added to the stable tree, please let know about it. >>From fb75a4282d0d9a3c7c44d940582c2d226cf3acfb Mon Sep 17 00:00:00 2001 From: Thomas Gleixner Date: Sat, 19 Dec 2015 20:07:38 +0000 Subject: futex: Drop refcount if requeue_pi() acquired the rtmutex From: Thomas Gleixner commit fb75a4282d0d9a3c7c44d940582c2d226cf3acfb upstream. If the proxy lock in the requeue loop acquires the rtmutex for a waiter then it acquired also refcount on the pi_state related to the futex, but the waiter side does not drop the reference count. Add the missing free_pi_state() call. Signed-off-by: Thomas Gleixner Cc: Peter Zijlstra Cc: Darren Hart Cc: Davidlohr Bueso Cc: Bhuvanesh_Surachari@mentor.com Cc: Andy Lowe Link: http://lkml.kernel.org/r/20151219200607.178132067@linutronix.de Signed-off-by: Thomas Gleixner Signed-off-by: Greg Kroah-Hartman --- kernel/futex.c | 5 +++++ 1 file changed, 5 insertions(+) --- a/kernel/futex.c +++ b/kernel/futex.c @@ -2494,6 +2494,11 @@ static int futex_wait_requeue_pi(u32 __u if (q.pi_state && (q.pi_state->owner != current)) { spin_lock(q.lock_ptr); ret = fixup_pi_state_owner(uaddr2, &q, current); + /* + * Drop the reference to the pi state which + * the requeue_pi() code acquired for us. + */ + free_pi_state(q.pi_state); spin_unlock(q.lock_ptr); } } else { Patches currently in stable-queue which might be from tglx@linutronix.de are queue-3.10/x86-asm-irq-stop-relying-on-magic-jmp-behavior-for-early_idt_handlers.patch queue-3.10/futex-drop-refcount-if-requeue_pi-acquired-the-rtmutex.patch queue-3.10/perf-fix-inherited-events-vs.-tracepoint-filters.patch