⬢ DragonFlyBSD Kernel Audit
DF-4266 / fix.diff
← back to finding ↓ download raw
--- a/sys/dev/netif/wb/if_wb.c
+++ b/sys/dev/netif/wb/if_wb.c
@@ -972,7 +972,9 @@ wb_rxeof(struct wb_softc *sc)
 	for (;;) {
 		rxstat = sc->wb_cdata.wb_rx_head->wb_ptr->wb_status;
-		if ((rxstat & WB_RXSTAT_OWN) == 0)
+
+		/* Process only descriptors the chip has released (OWN clear). */
+		if (rxstat & WB_RXSTAT_OWN)
 			break;
 
 		cur_rx = sc->wb_cdata.wb_rx_head;