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 Sync netmap sources with the version in our private tree. 2015-07-10 05:51:36 +00:00
if_ixl_netmap.h Sync netmap sources with the version in our private tree. 2015-07-10 05:51:36 +00:00
if_lem_netmap.h Sync netmap sources with the version in our private tree. 2015-07-10 05:51:36 +00:00
if_re_netmap.h Sync netmap sources with the version in our private tree. 2015-07-10 05:51:36 +00:00
if_vtnet_netmap.h Sync netmap sources with the version in our private tree. 2015-07-10 05:51:36 +00:00
ixgbe_netmap.h Add netmap support for ixgbe SRIOV VFs (that is, to if_ixv). 2015-07-15 01:02:01 +00:00
netmap_freebsd.c add a use count so the netmap module cannot be unloaded while in use. 2015-07-19 18:07:25 +00:00
netmap_generic.c Plug leak in m_unshare. 2016-03-26 23:39:53 +00:00
netmap_kern.h add a use count so the netmap module cannot be unloaded while in use. 2015-07-19 18:07:25 +00:00
netmap_mbq.c
netmap_mbq.h
netmap_mem2.c Sync netmap sources with the version in our private tree. 2015-07-10 05:51:36 +00:00
netmap_mem2.h Sync netmap sources with the version in our private tree. 2015-07-10 05:51:36 +00:00
netmap_monitor.c release a reference when stopping a monitor 2015-07-19 18:04:51 +00:00
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 do not free NULL if pipe allocation fails 2015-07-19 18:05:49 +00:00
netmap_vale.c properly destroy persistent vale ports 2015-07-19 18:06:30 +00:00
netmap.c Fix typo (s/harware/hardware/) 2015-12-25 14:51:36 +00:00