svn commit: r335970 - head/sys/kern

Matt Macy mmacy at FreeBSD.org
Wed Jul 4 21:34:09 UTC 2018


Author: mmacy
Date: Wed Jul  4 21:34:08 2018
New Revision: 335970
URL: https://svnweb.freebsd.org/changeset/base/335970

Log:
  epoch(9): make nesting assert in epoch_wait_preempt more specific
  
  Reported by:	markj

Modified:
  head/sys/kern/subr_epoch.c

Modified: head/sys/kern/subr_epoch.c
==============================================================================
--- head/sys/kern/subr_epoch.c	Wed Jul  4 21:21:59 2018	(r335969)
+++ head/sys/kern/subr_epoch.c	Wed Jul  4 21:34:08 2018	(r335970)
@@ -421,7 +421,9 @@ epoch_wait_preempt(epoch_t epoch)
 	if ((epoch->e_flags & EPOCH_LOCKED) == 0)
 		WITNESS_WARN(WARN_GIANTOK | WARN_SLEEPOK, NULL,
 		    "epoch_wait() can be long running");
-	KASSERT(td->td_epochnest == 0, ("epoch_wait() in the middle of an epoch section"));
+	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();


More information about the svn-src-head mailing list