⬢ DragonFlyBSD Kernel Audit
DF-4109 / fix.diff
← back to finding ↓ download raw
--- a/sys/dev/netif/tl/if_tl.c
+++ b/sys/dev/netif/tl/if_tl.c
@@ -1661,6 +1676,15 @@
 		if_devstart(ifp);
 }
 
+/*
+ * NOTE: never block on the serializer here.  tl_stop() calls
+ * callout_stop(&sc->tl_stat_timer) while holding if_serializer
+ * (tl_stop is reached under the serializer from tl_ioctl, tl_init,
+ * tl_watchdog, tl_detach and tl_intvec_adchk); DragonFly's callout_stop()
+ * synchronously waits for an in-progress callback, so a callback parked
+ * in lwkt_serialize_enter() deadlocks against the stopper (AB-BA).
+ * Try-enter instead and retry in one tick if the serializer is busy.
+ */
 static 
 void
 tl_stats_update(void *xsc)