[Bug 275002] if_wg: Missing failure check for m_copyback()

From: <bugzilla-noreply_at_freebsd.org>
Date: Thu, 16 Nov 2023 00:49:03 UTC
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=275002

John Baldwin <jhb@FreeBSD.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|New                         |Closed
         Resolution|---                         |Not A Bug

--- Comment #4 from John Baldwin <jhb@FreeBSD.org> ---
Hmm, you could perhaps KASSERT that mget2() returned a chain of the proper
length, but that's really just asserting that the API works as documented.  I'm
not quite sure it's worth asserting after m_copyback as the length really
shouldn't change.  Other places in the tree that use the pattern of
preallocating the mbuf chain by m_getm or m_get2 don't check the length after
m_copyback (linux_80211.c, iw_cxgbe/cm.c, gve_rx.c were ones I looked at), so I
don't think it's worth adding an assertion here.

-- 
You are receiving this mail because:
You are the assignee for the bug.