All of lore.kernel.org
 help / color / mirror / Atom feed
* Patch "futex: Drop refcount if requeue_pi() acquired the rtmutex" has been added to the 4.4-stable tree
@ 2016-02-24  3:24 gregkh
  0 siblings, 0 replies; only message in thread
From: gregkh @ 2016-02-24  3:24 UTC (permalink / raw)
  To: tglx, Andy_Lowe, darren, dave, gregkh, peterz; +Cc: stable, stable-commits


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 4.4-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-4.4 subdirectory.

If you, or anyone else, feels it should not be added to the stable tree,
please let <stable@vger.kernel.org> know about it.


>From fb75a4282d0d9a3c7c44d940582c2d226cf3acfb Mon Sep 17 00:00:00 2001
From: Thomas Gleixner <tglx@linutronix.de>
Date: Sat, 19 Dec 2015 20:07:38 +0000
Subject: futex: Drop refcount if requeue_pi() acquired the rtmutex

From: Thomas Gleixner <tglx@linutronix.de>

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 <tglx@linutronix.de>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Darren Hart <darren@dvhart.com>
Cc: Davidlohr Bueso <dave@stgolabs.net>
Cc: Bhuvanesh_Surachari@mentor.com
Cc: Andy Lowe <Andy_Lowe@mentor.com>
Link: http://lkml.kernel.org/r/20151219200607.178132067@linutronix.de
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

---
 kernel/futex.c |    5 +++++
 1 file changed, 5 insertions(+)

--- a/kernel/futex.c
+++ b/kernel/futex.c
@@ -2755,6 +2755,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-4.4/itimers-handle-relative-timers-with-config_time_low_res-proper.patch
queue-4.4/futex-drop-refcount-if-requeue_pi-acquired-the-rtmutex.patch
queue-4.4/x86-mm-pat-avoid-truncation-when-converting-cpa-numpages-to-address.patch
queue-4.4/x86-uaccess-64-handle-the-caching-of-4-byte-nocache-copies-properly-in-__copy_user_nocache.patch
queue-4.4/timerfd-handle-relative-timers-with-config_time_low_res-proper.patch
queue-4.4/posix-timers-handle-relative-timers-with-config_time_low_res-proper.patch
queue-4.4/x86-mm-fix-vmalloc_fault-to-handle-large-pages-properly.patch
queue-4.4/x86-mm-fix-types-used-in-pgprot-cacheability-flags-translations.patch
queue-4.4/x86-uaccess-64-make-the-__copy_user_nocache-assembly-code-more-readable.patch

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2016-02-24  3:44 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-02-24  3:24 Patch "futex: Drop refcount if requeue_pi() acquired the rtmutex" has been added to the 4.4-stable tree gregkh

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.