diff options
author | kib <kib@FreeBSD.org> | 2014-08-29 08:42:20 +0000 |
---|---|---|
committer | kib <kib@FreeBSD.org> | 2014-08-29 08:42:20 +0000 |
commit | c679006e55ca61e8bf0e161f360cb069e4013bd2 (patch) | |
tree | d187f1f485e75715fccdf8b58aa0b88ff50769f9 | |
parent | a1ef6db10241687eef4d1d32a208835662206c80 (diff) | |
download | FreeBSD-src-c679006e55ca61e8bf0e161f360cb069e4013bd2.zip FreeBSD-src-c679006e55ca61e8bf0e161f360cb069e4013bd2.tar.gz |
MFC r270345:
In do_lock_pi(), do not override error from umtxq_sleep_pi() when
doing suspend check.
-rw-r--r-- | sys/kern/kern_umtx.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/sys/kern/kern_umtx.c b/sys/kern/kern_umtx.c index 0e21383..f3ff3be 100644 --- a/sys/kern/kern_umtx.c +++ b/sys/kern/kern_umtx.c @@ -2071,10 +2071,12 @@ do_lock_pi(struct thread *td, struct umutex *m, uint32_t flags, * 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); } |