diff --git a/sys/kern/kern_umtx.c b/sys/kern/kern_umtx.c index f326b9aa691..7c01586b4dd 100644 --- a/sys/kern/kern_umtx.c +++ b/sys/kern/kern_umtx.c @@ -2618,6 +2618,10 @@ do_lock_pp(struct thread *td, struct umutex *m, uint32_t flags, } } else if (owner == UMUTEX_RB_NOTRECOV) { error = ENOTRECOVERABLE; + } else if (owner == UMUTEX_CONTESTED) { + /* Spurious failure, retry. */ + umtxq_unbusy_unlocked(&uq->uq_key); + continue; } if (try != 0) @@ -2824,6 +2828,10 @@ do_set_ceiling(struct thread *td, struct umutex *m, uint32_t ceiling, } else if (owner == UMUTEX_RB_NOTRECOV) { error = ENOTRECOVERABLE; break; + } else if (owner == UMUTEX_CONTESTED) { + /* Spurious failure, retry. */ + umtxq_unbusy_unlocked(&uq->uq_key); + continue; } /*