⬢ DragonFlyBSD Kernel Audit
DF-2967 / fix.diff
← back to finding ↓ download raw
--- a/sys/kern/kern_wdog.c
+++ b/sys/kern/kern_wdog.c
@@ -171,6 +171,11 @@
 void
 wdog_disable(void)
 {
+	if (panicstr) {
+		/* panic path: no sleeping, no spinlocks that may be held */
+		callout_stop_async(&wdog_callout);
+		return;
+	}
 	callout_stop(&wdog_callout);
 	wdog_set_period(0);
 	wdog_reset_all(NULL);