svn commit: r270345 - head/sys/kern

Konstantin Belousov kib at FreeBSD.org
Fri Aug 22 18:42:15 UTC 2014


Author: kib
Date: Fri Aug 22 18:42:14 2014
New Revision: 270345
URL: http://svnweb.freebsd.org/changeset/base/270345

Log:
  In do_lock_pi(), do not override error from umtxq_sleep_pi() when
  doing suspend check.  This restores the pre-r251684 behaviour, to
  retry once after the signal is detected.
  
  PR:	kern/192918
  Submitted by:	Elliott Rabe, Dell Inc., Eric van Gyzen <eric at vangyzen.net>
  Obtained from:	Dell Inc.
  MFC after:	1 week

Modified:
  head/sys/kern/kern_umtx.c

Modified: head/sys/kern/kern_umtx.c
==============================================================================
--- head/sys/kern/kern_umtx.c	Fri Aug 22 18:09:06 2014	(r270344)
+++ head/sys/kern/kern_umtx.c	Fri Aug 22 18:42:14 2014	(r270345)
@@ -1700,10 +1700,12 @@ do_lock_pi(struct thread *td, struct umu
 		 * and we need to retry or we lost a race to the thread
 		 * unlocking the umtx.
 		 */
-		if (old == owner)
+		if (old == owner) {
 			error = umtxq_sleep_pi(uq, pi, owner & ~UMUTEX_CONTESTED,
 			    "umtxpi", timeout == NULL ? NULL : &timo);
-		else {
+			if (error != 0)
+				continue;
+		} else {
 			umtxq_unbusy(&uq->uq_key);
 			umtxq_unlock(&uq->uq_key);
 		}


More information about the svn-src-head mailing list