summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authoroga <oga@openbsd.org>2008-09-05 14:11:57 +0000
committeroga <oga@openbsd.org>2008-09-05 14:11:57 +0000
commit3ea4e7d0e41c27c30de27f241bb9500bbe0cd02f (patch)
treef20fdf5b91fdfe0e9de9971bfc7b0be6c6af397c
parentremove remaining MALLOC/FREE bits (diff)
downloadwireguard-openbsd-3ea4e7d0e41c27c30de27f241bb9500bbe0cd02f.tar.xz
wireguard-openbsd-3ea4e7d0e41c27c30de27f241bb9500bbe0cd02f.zip
When munging the WANTIPL of the mutex to prevent undoing the sched_lock,
use the constant for IPL_SCHED, and not splsched(), which doesn't do what we want. ok art@. Tested by Paul de Weerd.
-rw-r--r--sys/kern/kern_synch.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/sys/kern/kern_synch.c b/sys/kern/kern_synch.c
index d1dc798669e..529ad02fb5a 100644
--- a/sys/kern/kern_synch.c
+++ b/sys/kern/kern_synch.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: kern_synch.c,v 1.83 2007/11/30 16:44:44 oga Exp $ */
+/* $OpenBSD: kern_synch.c,v 1.84 2008/09/05 14:11:57 oga Exp $ */
/* $NetBSD: kern_synch.c,v 1.37 1996/04/22 01:38:37 christos Exp $ */
/*
@@ -156,7 +156,7 @@ msleep(void *ident, struct mutex *mtx, int priority, const char *wmesg, int tim
* correct when the sched_lock is a mutex.
*/
spl = MUTEX_OLDIPL(mtx);
- MUTEX_OLDIPL(mtx) = splsched();
+ MUTEX_OLDIPL(mtx) = IPL_SCHED;
mtx_leave(mtx);
}