0b3b29f07b
m_unshare passes on the source mbuf's flags as-is to m_getcl and this results in a leak if the flags include M_NOFREE. The fix is to clear the bits not listed in M_COPYALL before calling m_getcl. M_RDONLY should probably be filtered out too but that's outside the scope of this fix. Add assertions in the zone_mbuf and zone_pack ctors to catch similar bugs. Update netmap_get_mbuf to not pass M_NOFREE to m_getcl. It's not clear what the original code was trying to do but it's likely incorrect. Updated code is no different functionally but it avoids the newly added assertions. Reviewed by: gnn@ Sponsored by: Chelsio Communications Differential Revision: https://reviews.freebsd.org/D5698 |
||
---|---|---|
.. | ||
if_em_netmap.h | ||
if_igb_netmap.h | ||
if_ixl_netmap.h | ||
if_lem_netmap.h | ||
if_re_netmap.h | ||
if_vtnet_netmap.h | ||
ixgbe_netmap.h | ||
netmap_freebsd.c | ||
netmap_generic.c | ||
netmap_kern.h | ||
netmap_mbq.c | ||
netmap_mbq.h | ||
netmap_mem2.c | ||
netmap_mem2.h | ||
netmap_monitor.c | ||
netmap_offloadings.c | ||
netmap_pipe.c | ||
netmap_vale.c | ||
netmap.c |