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();
_______________________________________________
svn-src-head@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"

Reply via email to