diff options
author | tjr <tjr@FreeBSD.org> | 2003-09-07 11:14:52 +0000 |
---|---|---|
committer | tjr <tjr@FreeBSD.org> | 2003-09-07 11:14:52 +0000 |
commit | 29332e48cc71d7ad6d8a08a3ad75761b922d5439 (patch) | |
tree | c111ce5123463269eebf07c3b5566ec81f49a4f6 | |
parent | facd570df8bba625c16c09c71f1607741e385cfa (diff) | |
download | FreeBSD-src-29332e48cc71d7ad6d8a08a3ad75761b922d5439.zip FreeBSD-src-29332e48cc71d7ad6d8a08a3ad75761b922d5439.tar.gz |
Return EINVAL if the contested bit is not set on the umtx passed to
_umtx_unlock() instead of firing a KASSERT.
-rw-r--r-- | sys/kern/kern_umtx.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/sys/kern/kern_umtx.c b/sys/kern/kern_umtx.c index 032f6b4..cbd2e5a 100644 --- a/sys/kern/kern_umtx.c +++ b/sys/kern/kern_umtx.c @@ -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; /* |