This is a note to let you know that I've just added the patch titled
futex: Test for pi_mutex on fault in futex_wait_requeue_pi()
to the 3.5-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-test-for-pi_mutex-on-fault-in-futex_wait_requeue_pi.patch
and it can be found in the queue-3.5 subdirectory.
If you, or anyone else, feels it should not be added to the stable tree,
please let <[email protected]> know about it.
>From b6070a8d9853eda010a549fa9a09eb8d7269b929 Mon Sep 17 00:00:00 2001
From: Darren Hart <[email protected]>
Date: Fri, 20 Jul 2012 11:53:29 -0700
Subject: futex: Test for pi_mutex on fault in futex_wait_requeue_pi()
From: Darren Hart <[email protected]>
commit b6070a8d9853eda010a549fa9a09eb8d7269b929 upstream.
If fixup_pi_state_owner() faults, pi_mutex may be NULL. Test
for pi_mutex != NULL before testing the owner against current
and possibly unlocking it.
Signed-off-by: Darren Hart <[email protected]>
Cc: Dave Jones <[email protected]>
Cc: Dan Carpenter <[email protected]>
Link:
http://lkml.kernel.org/r/dc59890338fc413606f04e5c5b131530734dae3d.1342809673.git.dvh...@linux.intel.com
Signed-off-by: Thomas Gleixner <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
---
kernel/futex.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
--- a/kernel/futex.c
+++ b/kernel/futex.c
@@ -2370,7 +2370,7 @@ static int futex_wait_requeue_pi(u32 __u
* fault, unlock the rt_mutex and return the fault to userspace.
*/
if (ret == -EFAULT) {
- if (rt_mutex_owner(pi_mutex) == current)
+ if (pi_mutex && rt_mutex_owner(pi_mutex) == current)
rt_mutex_unlock(pi_mutex);
} else if (ret == -EINTR) {
/*
Patches currently in stable-queue which might be from [email protected] are
queue-3.5/futex-fix-bug-in-warn_on-for-null-q.pi_state.patch
queue-3.5/futex-test-for-pi_mutex-on-fault-in-futex_wait_requeue_pi.patch
queue-3.5/futex-forbid-uaddr-uaddr2-in-futex_wait_requeue_pi.patch
--
To unsubscribe from this list: send the line "unsubscribe stable" in
the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html