diff --git a/sys/kern/kern_umtx.c b/sys/kern/kern_umtx.c --- a/sys/kern/kern_umtx.c +++ b/sys/kern/kern_umtx.c @@ -2262,6 +2262,17 @@ break; } + /* + * Nobody owns it, but the acquire failed. This can happen + * with ll/sc atomics. + */ + if (owner == UMUTEX_UNOWNED) { + error = thread_check_susp(td, true); + if (error != 0) + break; + continue; + } + /* * Avoid overwriting a possible error from sleep due * to the pending signal with suspension check result.