Return EINVAL if the contested bit is not set on the umtx passed to

_umtx_unlock() instead of firing a KASSERT.
This commit is contained in:
Tim J. Robbins 2003-09-07 11:14:52 +00:00
parent 4fe15b85a6
commit f05a427aa6

View File

@ -265,7 +265,8 @@ _umtx_unlock(struct thread *td, struct _umtx_unlock_args *uap)
return (EPERM);
/* We should only ever be in here for contested locks */
KASSERT((owner & UMTX_CONTESTED) != 0, ("contested umtx is not."));
if ((owner & UMTX_CONTESTED) == 0)
return (EINVAL);
blocked = NULL;
/*