git: 559fb03f9696 - stable/13 - rsu: add KASSERT to document maximum mbuf size in rsu_tx_start
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Wed, 09 Feb 2022 17:40:30 UTC
The branch stable/13 has been updated by emaste: URL: https://cgit.FreeBSD.org/src/commit/?id=559fb03f96961084a754388db5f4ffdc9df92002 commit 559fb03f96961084a754388db5f4ffdc9df92002 Author: Ed Maste <emaste@FreeBSD.org> AuthorDate: 2021-03-22 18:34:31 +0000 Commit: Ed Maste <emaste@FreeBSD.org> CommitDate: 2022-02-09 17:28:42 +0000 rsu: add KASSERT to document maximum mbuf size in rsu_tx_start PR: 254479 Reviewed by: markj Sponsored by: The FreeBSD Foundation (cherry picked from commit 453d8a7ee2fc862f3a5e98185d57c8ad05cbc047) --- 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 ff0ec77b476c..747e3532cde4 100644 --- a/sys/dev/usb/wlan/if_rsu.c +++ b/sys/dev/usb/wlan/if_rsu.c @@ -2899,6 +2899,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;