Date: Mon, 22 Mar 2021 18:35:57 GMT From: Ed Maste <emaste@FreeBSD.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org Subject: git: 453d8a7ee2fc - main - rsu: add KASSERT to document maximum mbuf size in rsu_tx_start Message-ID: <202103221835.12MIZvdJ008993@gitrepo.freebsd.org>
next in thread | raw e-mail | index | archive | help
The branch main has been updated by emaste: URL: https://cgit.FreeBSD.org/src/commit/?id=453d8a7ee2fc862f3a5e98185d57c8ad05cbc047 commit 453d8a7ee2fc862f3a5e98185d57c8ad05cbc047 Author: Ed Maste <emaste@FreeBSD.org> AuthorDate: 2021-03-22 18:34:31 +0000 Commit: Ed Maste <emaste@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;
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202103221835.12MIZvdJ008993>