aboutsummaryrefslogtreecommitdiff
path: root/sys/kern/subr_epoch.c
diff options
context:
space:
mode:
authorKonstantin Belousov <kib@FreeBSD.org>2020-01-13 14:30:19 +0000
committerKonstantin Belousov <kib@FreeBSD.org>2020-01-13 14:30:19 +0000
commitfedab1b4998d10f072d601bf3b0e1cb50a110095 (patch)
tree00fa2c82614c7d941611243dc7bf274835090126 /sys/kern/subr_epoch.c
parent5452c16c2138f6f68e7c447a80856a779e5eea6f (diff)
downloadsrc-fedab1b4998d10f072d601bf3b0e1cb50a110095.tar.gz
src-fedab1b4998d10f072d601bf3b0e1cb50a110095.zip
Code must not unlock a mutex while owning the thread lock.
Reviewed by: hselasky, markj Sponsored by: Mellanox Technologies MFC after: 1 week Differential revision: https://reviews.freebsd.org/D23150
Notes
Notes: svn path=/head/; revision=356682
Diffstat (limited to 'sys/kern/subr_epoch.c')
-rw-r--r--sys/kern/subr_epoch.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/sys/kern/subr_epoch.c b/sys/kern/subr_epoch.c
index a2b99d12a390..39fe3125395e 100644
--- a/sys/kern/subr_epoch.c
+++ b/sys/kern/subr_epoch.c
@@ -610,8 +610,8 @@ epoch_wait_preempt(epoch_t epoch)
KASSERT(!in_epoch(epoch), ("epoch_wait_preempt() called in the middle "
"of an epoch section of the same epoch"));
#endif
- thread_lock(td);
DROP_GIANT();
+ thread_lock(td);
old_cpu = PCPU_GET(cpuid);
old_pinned = td->td_pinned;