⬢ DragonFlyBSD Kernel Audit
DF-3750 / fix.diff
← back to finding ↓ download raw
diff -u -r a/sys/dev/netif/ral/rt2860.c b/sys/dev/netif/ral/rt2860.c
--- a/sys/dev/netif/ral/rt2860.c	2026-09-16 01:12:27.099417647 +0000
+++ b/sys/dev/netif/ral/rt2860.c	2026-09-16 01:12:33.295339460 +0000
@@ -1780,6 +1780,16 @@
 		m_freem(m);
 		return ENETDOWN;
 	}
+	/*
+	 * The TXWI pool can be exhausted while rings still admit frames
+	 * (128 pool entries vs up to ~6*63 in-flight frames); rt2860_tx /
+	 * rt2860_tx_raw only assert the pool non-empty (DF-3750).
+	 */
+	if (SLIST_EMPTY(&sc->data_pool)) {
+		RAL_UNLOCK(sc);
+		m_freem(m);
+		return ENOBUFS;
+	}
 	if (params == NULL) {
 		/*
 		 * Legacy path; interpret frame contents to decide