svn commit: r270789 - stable/10/sys/kern

Konstantin Belousov kib at FreeBSD.org
Fri Aug 29 08:42:21 UTC 2014


Author: kib
Date: Fri Aug 29 08:42:20 2014
New Revision: 270789
URL: http://svnweb.freebsd.org/changeset/base/270789

Log:
  MFC r270345:
  In do_lock_pi(), do not override error from umtxq_sleep_pi() when
  doing suspend check.

Modified:
  stable/10/sys/kern/kern_umtx.c
Directory Properties:
  stable/10/   (props changed)

Modified: stable/10/sys/kern/kern_umtx.c
==============================================================================
--- stable/10/sys/kern/kern_umtx.c	Fri Aug 29 08:38:34 2014	(r270788)
+++ stable/10/sys/kern/kern_umtx.c	Fri Aug 29 08:42:20 2014	(r270789)
@@ -2071,10 +2071,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-all mailing list