summaryrefslogtreecommitdiffstats
path: root/sys/kern/kern_tc.c
diff options
context:
space:
mode:
authorcheloha <cheloha@openbsd.org>2020-07-20 21:51:34 +0000
committercheloha <cheloha@openbsd.org>2020-07-20 21:51:34 +0000
commit04cecb0176788cbc1bfc0bd13c159a60ce0fac98 (patch)
tree9597355572f598eb537fa36d80d06ad65c4e3033 /sys/kern/kern_tc.c
parenttimecounting: misc. cleanup in tc_setclock() and tc_setrealtimeclock() (diff)
downloadwireguard-openbsd-04cecb0176788cbc1bfc0bd13c159a60ce0fac98.tar.xz
wireguard-openbsd-04cecb0176788cbc1bfc0bd13c159a60ce0fac98.zip
timecounting: add missing mutex assertion to tc_update_timekeep()
Diffstat (limited to 'sys/kern/kern_tc.c')
-rw-r--r--sys/kern/kern_tc.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/sys/kern/kern_tc.c b/sys/kern/kern_tc.c
index 5b84d2d5095..a7cf9cdaa62 100644
--- a/sys/kern/kern_tc.c
+++ b/sys/kern/kern_tc.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: kern_tc.c,v 1.66 2020/07/20 21:43:02 cheloha Exp $ */
+/* $OpenBSD: kern_tc.c,v 1.67 2020/07/20 21:51:34 cheloha Exp $ */
/*
* Copyright (c) 2000 Poul-Henning Kamp <phk@FreeBSD.org>
@@ -531,6 +531,8 @@ tc_update_timekeep(void)
static struct timecounter *last_tc = NULL;
struct timehands *th;
+ MUTEX_ASSERT_LOCKED(&windup_mtx);
+
if (timekeep == NULL)
return;