np 0b3b29f07b 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
..
2016-03-21 21:38:35 +00:00
2015-07-20 09:37:42 +00:00
2016-03-01 23:58:53 +00:00
2015-04-22 14:38:58 +00:00
2016-01-27 19:55:02 +00:00
2016-03-26 23:39:53 +00:00
2016-02-23 23:37:10 +00:00
2015-01-22 11:12:42 +00:00
2015-11-19 05:50:22 +00:00
2014-08-11 15:06:07 +00:00
2015-07-29 17:18:27 +00:00
2016-03-21 21:38:35 +00:00
2016-03-21 21:38:35 +00:00
2015-06-10 10:48:12 +00:00
2016-03-26 23:39:53 +00:00
2015-03-17 14:16:50 +00:00
2016-03-21 08:03:50 +00:00
2016-02-07 16:18:12 +00:00