summaryrefslogtreecommitdiffstats
path: root/lib/libthr/thread/thr_init.c
diff options
context:
space:
mode:
authornp <np@FreeBSD.org>2016-04-01 01:39:44 +0000
committernp <np@FreeBSD.org>2016-04-01 01:39:44 +0000
commit3c07b218c4c87b0e1dbf8ce585f7fad4d49f2c09 (patch)
tree04c531edc9702284c235a1dd73d73c725fa2551c /lib/libthr/thread/thr_init.c
parent8dd17d694b5acc40fd8afe42eb42629de9db5cae (diff)
downloadFreeBSD-src-3c07b218c4c87b0e1dbf8ce585f7fad4d49f2c09.zip
FreeBSD-src-3c07b218c4c87b0e1dbf8ce585f7fad4d49f2c09.tar.gz
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
Diffstat (limited to 'lib/libthr/thread/thr_init.c')
0 files changed, 0 insertions, 0 deletions
OpenPOWER on IntegriCloud