⬢ DragonFlyBSD Kernel Audit
DF-3807 / fix.diff
← back to finding ↓ download raw
--- a/sys/dev/netif/msk/if_msk.c
+++ b/sys/dev/netif/msk/if_msk.c
@@ -3171,6 +3171,13 @@
 		if (sc_if == NULL) {
 			device_printf(sc->msk_dev, "invalid port opcode "
 			    "0x%08x\n", control & STLE_OP_MASK);
+			/*
+			 * Advance the consumer index: 'continue' must not
+			 * skip the loop's only MSK_INC() (if_msk.c:3224) or
+			 * the drain makes no progress and mskc_intr()'s
+			 * outer while spins forever on this LE.
+			 */
+			MSK_INC(cons, MSK_STAT_RING_CNT);
 			continue;
 		}