summaryrefslogtreecommitdiffstats
path: root/sys/kern
diff options
context:
space:
mode:
authorkib <kib@FreeBSD.org>2014-08-22 18:42:14 +0000
committerkib <kib@FreeBSD.org>2014-08-22 18:42:14 +0000
commitfbb1e58092ad6e061aa0ec46be88137bd356f372 (patch)
treeea1110d982e80c304828de4def2528daebe536ab /sys/kern
parent8b0b4404127d2d0731b3f3a658d2edc7a5cbb93d (diff)
downloadFreeBSD-src-fbb1e58092ad6e061aa0ec46be88137bd356f372.zip
FreeBSD-src-fbb1e58092ad6e061aa0ec46be88137bd356f372.tar.gz
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@vangyzen.net> Obtained from: Dell Inc. MFC after: 1 week
Diffstat (limited to 'sys/kern')
-rw-r--r--sys/kern/kern_umtx.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/sys/kern/kern_umtx.c b/sys/kern/kern_umtx.c
index 67720f8..7cfef38 100644
--- a/sys/kern/kern_umtx.c
+++ b/sys/kern/kern_umtx.c
@@ -1700,10 +1700,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);
}
OpenPOWER on IntegriCloud