svn commit: r255016 - head/sys/sys
Navdeep Parhar
np at FreeBSD.org
Thu Aug 29 08:07:36 UTC 2013
Author: np
Date: Thu Aug 29 08:07:35 2013
New Revision: 255016
URL: http://svnweb.freebsd.org/changeset/base/255016
Log:
Merge r254736 from user/np/cxl_tuning.
Don't leak tags when M_NOFREE | M_PKTHDR mbufs are freed.
Reviewed by: andre
Modified:
head/sys/sys/mbuf.h
Directory Properties:
head/sys/ (props changed)
Modified: head/sys/sys/mbuf.h
==============================================================================
--- head/sys/sys/mbuf.h Thu Aug 29 06:26:22 2013 (r255015)
+++ head/sys/sys/mbuf.h Thu Aug 29 08:07:35 2013 (r255016)
@@ -646,18 +646,6 @@ m_getcl(int how, short type, int flags)
return (uma_zalloc_arg(zone_pack, &args, how));
}
-static __inline struct mbuf *
-m_free(struct mbuf *m)
-{
- struct mbuf *n = m->m_next;
-
- if (m->m_flags & M_EXT)
- mb_free_ext(m);
- else if ((m->m_flags & M_NOFREE) == 0)
- uma_zfree(zone_mbuf, m);
- return (n);
-}
-
static __inline void
m_clget(struct mbuf *m, int how)
{
@@ -1124,6 +1112,20 @@ m_tag_find(struct mbuf *m, int type, str
m_tag_locate(m, MTAG_ABI_COMPAT, type, start));
}
+static __inline struct mbuf *
+m_free(struct mbuf *m)
+{
+ struct mbuf *n = m->m_next;
+
+ if ((m->m_flags & (M_PKTHDR|M_NOFREE)) == (M_PKTHDR|M_NOFREE))
+ m_tag_delete_chain(m, NULL);
+ if (m->m_flags & M_EXT)
+ mb_free_ext(m);
+ else if ((m->m_flags & M_NOFREE) == 0)
+ uma_zfree(zone_mbuf, m);
+ return (n);
+}
+
static int inline
rt_m_getfib(struct mbuf *m)
{
More information about the svn-src-all
mailing list