HomeFreeBSD

When deciding whether to call m_pullup() even though there is adequate

Description

When deciding whether to call m_pullup() even though there is adequate
data in an mbuf, use M_WRITABLE() instead of a direct test of M_EXT;
the latter both unnecessarily exposes mbuf-allocator internals in the
protocol stack and is also insufficient to catch all cases of
non-writability.

(NB: m_pullup() does not actually guarantee that a writable mbuf is
returned, so further refinement of all of these code paths continues to
be required.)

Reviewed by: bz
MFC after: 3 days
Sponsored by: EMC / Isilon Storage Division
Differential Revision: https://reviews.freebsd.org/D900

Details

Provenance
rwatsonAuthored on
Reviewer
bz
Differential Revision
D900: Use M_WRITABLE() rather than direct M_EXT checks
Parents
rS272983: sh: Fix break/continue/return in multiline eval.
Branches
Unknown
Tags
Unknown

Event Timeline