git: 453d8a7ee2fc - main - rsu: add KASSERT to document maximum mbuf size in rsu_tx_start
Ed Maste
emaste at FreeBSD.org
Mon Mar 22 18:35:57 UTC 2021
The branch main has been updated by emaste:
URL: https://cgit.FreeBSD.org/src/commit/?id=453d8a7ee2fc862f3a5e98185d57c8ad05cbc047
commit 453d8a7ee2fc862f3a5e98185d57c8ad05cbc047
Author: Ed Maste <emaste at FreeBSD.org>
AuthorDate: 2021-03-22 18:34:31 +0000
Commit: Ed Maste <emaste at FreeBSD.org>
CommitDate: 2021-03-22 18:34:44 +0000
rsu: add KASSERT to document maximum mbuf size in rsu_tx_start
PR: 254479
Reviewed by: markj
Sponsored by: The FreeBSD Foundation
---
sys/dev/usb/wlan/if_rsu.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/sys/dev/usb/wlan/if_rsu.c b/sys/dev/usb/wlan/if_rsu.c
index f2dc6657026e..4dd1c624b9d0 100644
--- a/sys/dev/usb/wlan/if_rsu.c
+++ b/sys/dev/usb/wlan/if_rsu.c
@@ -2897,6 +2897,7 @@ rsu_tx_start(struct rsu_softc *sc, struct ieee80211_node *ni,
}
xferlen = sizeof(*txd) + m0->m_pkthdr.len;
+ KASSERT(xferlen <= RSU_TXBUFSZ, ("%s: invalid length", __func__));
m_copydata(m0, 0, m0->m_pkthdr.len, (caddr_t)&txd[1]);
data->buflen = xferlen;
More information about the dev-commits-src-main
mailing list