+ futex-pi-enforce-waiter-bit-when-owner-died-is-detected.patch added to -mm tree

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



The patch titled

     futex-pi: Enforce waiter bit when owner died is detected

has been added to the -mm tree.  Its filename is

     futex-pi-enforce-waiter-bit-when-owner-died-is-detected.patch

See http://www.zip.com.au/~akpm/linux/patches/stuff/added-to-mm.txt to find
out what to do about this


From: Thomas Gleixner <tglx@xxxxxxxxxxxxx>

simplifies the glibc handling of the possible race from userspace tasks which
try to get hold of the lock and cleanup the mess which was leftover by the
unexpectedly died previous owner.

Signed-off-by: Thomas Gleixner <tglx@xxxxxxxxxxxxx>
Signed-off-by: Ingo Molnar <mingo@xxxxxxx>
Signed-off-by: Andrew Morton <akpm@xxxxxxxx>
---

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

diff -puN kernel/futex.c~futex-pi-enforce-waiter-bit-when-owner-died-is-detected kernel/futex.c
--- 25/kernel/futex.c~futex-pi-enforce-waiter-bit-when-owner-died-is-detected	Wed Apr 26 14:24:21 2006
+++ 25-akpm/kernel/futex.c	Wed Apr 26 14:24:21 2006
@@ -1161,11 +1161,16 @@ static int futex_lock_pi(u32 __user *uad
 		 * failed. When the OWNER_DIED bit is set, then we
 		 * know that this is a robust futex and we actually
 		 * take the lock. This is safe as we are protected by
-		 * the hash bucket lock.
+		 * the hash bucket lock. We also set the waiters bit
+		 * unconditionally here, to simplify glibc handling of
+		 * multiple tasks racing to acquire the lock and
+		 * cleanup the problems which were left by the dead
+		 * owner.
 		 */
 		if (curval & FUTEX_OWNER_DIED) {
 			uval = newval;
-			newval = current->pid | FUTEX_OWNER_DIED;
+			newval = current->pid |
+				FUTEX_OWNER_DIED | FUTEX_WAITERS;
 
 			inc_preempt_count();
 			curval = futex_atomic_cmpxchg_inatomic(uaddr,
_

Patches currently in -mm which might be from tglx@xxxxxxxxxxxxx are

git-mtd.patch
cleanup-default-value-of-mtd_pcmcia_anonymous.patch
pi-futex-futex-code-cleanups.patch
pi-futex-introduce-debug_check_no_locks_freed.patch
pi-futex-add-plist-implementation.patch
pi-futex-scheduler-support-for-pi.patch
pi-futex-rt-mutex-core.patch
pi-futex-rt-mutex-core-fix-timeout-race.patch
pi-futex-rt-mutex-docs.patch
pi-futex-rt-mutex-debug.patch
pi-futex-rt-mutex-tester.patch
pi-futex-rt-mutex-futex-api.patch
pi-futex-futex_lock_pi-futex_unlock_pi-support.patch
rtmutex-remove-buggy-bug_on-in-pi-boosting-code.patch
futex-pi-enforce-waiter-bit-when-owner-died-is-detected.patch
rtmutex-debug-printk-correct-task-information.patch
futex-pi-make-use-of-restart_block-when-interrupted.patch

-
To unsubscribe from this list: send the line "unsubscribe mm-commits" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Kernel Newbies FAQ]     [Kernel Archive]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [Bugtraq]     [Photo]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]

  Powered by Linux