freebsd-nq/sys/dev/netmap
Navdeep Parhar fddd4f6273 Plug leak in m_unshare.
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
2016-03-26 23:39:53 +00:00
..
if_em_netmap.h Switch em(4) to the extended RX descriptor format. This matches the 2016-01-07 16:42:48 +00:00
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 Plug leak in m_unshare. 2016-03-26 23:39:53 +00:00
netmap_kern.h
netmap_mbq.c
netmap_mbq.h
netmap_mem2.c
netmap_mem2.h
netmap_monitor.c
netmap_offloadings.c These files were getting sys/malloc.h and vm/uma.h with header pollution 2016-02-01 17:41:21 +00:00
netmap_pipe.c
netmap_vale.c
netmap.c Fix typo (s/harware/hardware/) 2015-12-25 14:51:36 +00:00