opnsense-src/sys/dev/netmap
np fdc22de28e MFC r297298:
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.

Sponsored by:	Chelsio Communications
2016-08-02 07:18:48 +02:00
..
if_em_netmap.h revert extended descr format for intel em(4), breaks netmap for some chipsets 2016-08-01 03:24:16 +02:00
if_igb_netmap.h *: upgrade to 10.1 as a bulk commit 2015-02-10 19:21:02 +01:00
if_ixl_netmap.h src: clean-cut move to release/10.3.0 2016-05-21 08:25:57 +02:00
if_lem_netmap.h src: clean-cut move to 10.2-RELEASE 2015-08-14 14:15:00 +02:00
if_re_netmap.h src: clean-cut move to 10.2-RELEASE 2015-08-14 14:15:00 +02:00
if_vtnet_netmap.h *: upgrade to 10.1 as a bulk commit 2015-02-10 19:21:02 +01:00
ixgbe_netmap.h src: clean-cut move to release/10.3.0 2016-05-21 08:25:57 +02:00
netmap.c netmap: ring size limit not enough for multi-queue em(4) 2016-05-21 08:42:02 +02:00
netmap_freebsd.c src: clean-cut move to 10.2-RELEASE 2015-08-14 14:15:00 +02:00
netmap_generic.c MFC r297298: 2016-08-02 07:18:48 +02:00
netmap_kern.h netmap: ring size limit not enough for multi-queue em(4) 2016-05-21 08:42:02 +02:00
netmap_mbq.c *: upgrade to 10.1 as a bulk commit 2015-02-10 19:21:02 +01:00
netmap_mbq.h *: upgrade to 10.1 as a bulk commit 2015-02-10 19:21:02 +01:00
netmap_mem2.c netmap: ring size limit not enough for multi-queue em(4) 2016-05-21 08:42:02 +02:00
netmap_mem2.h *: upgrade to 10.1 as a bulk commit 2015-02-10 19:21:02 +01:00
netmap_monitor.c src: clean-cut move to 10.2-RELEASE 2015-08-14 14:15:00 +02:00
netmap_offloadings.c *: upgrade to 10.1 as a bulk commit 2015-02-10 19:21:02 +01:00
netmap_pipe.c src: clean-cut move to 10.2-RELEASE 2015-08-14 14:15:00 +02:00
netmap_vale.c *: upgrade to 10.1 as a bulk commit 2015-02-10 19:21:02 +01:00