DragonFlyBSD Kernel Audit
DF-2728 / fix.diff
← back to finding ↓ download raw
--- a/sys/kern/lwkt_thread.c
+++ b/sys/kern/lwkt_thread.c
@@ -1023,7 +1023,15 @@
 #endif
 	return;
     }
-    KKASSERT(gd->gd_processing_ipiq == 0);
+    /*
+     * NOTE: Do NOT assert gd_processing_ipiq == 0 here.  When a
+     * preemptable (interrupt) thread is scheduled remotely via a
+     * framed IPI, lwkt_schedule_remote() deliberately drops the
+     * critical section inside IPI dispatch to allow this
+     * preemption (see lwkt_schedule_remote()).  That path is by
+     * design and all crit/intr-nesting/ipiq accounting is
+     * balanced across it.
+     */
 
     /*
      * Since we are able to preempt the current thread, there is no need to