Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 24 Sep 2007 04:54:09 GMT
From:      Kip Macy <kmacy@FreeBSD.org>
To:        Perforce Change Reviews <perforce@freebsd.org>
Subject:   PERFORCE change 126760 for review
Message-ID:  <200709240454.l8O4s9Sw090390@repoman.freebsd.org>

next in thread | raw e-mail | index | archive | help
http://perforce.freebsd.org/chv.cgi?CH=126760

Change 126760 by kmacy@kmacy_home:ethng on 2007/09/24 04:54:01

	- we should never make it as far as the dtor if the memory is allocated from
	  another zone, but a KASSERT that this isn't an embedded mbuf just in case
	- initialize ref_cnt packet zone ctor

Affected files ...

.. //depot/projects/ethng/src/sys/kern/kern_mbuf.c#7 edit

Differences ...

==== //depot/projects/ethng/src/sys/kern/kern_mbuf.c#7 (text+ko) ====

@@ -355,6 +355,7 @@
 	if ((flags & MB_NOTAGS) == 0 && (m->m_flags & M_PKTHDR) != 0)
 		m_tag_delete_chain(m, NULL);
 	KASSERT((m->m_flags & M_EXT) == 0, ("%s: M_EXT set", __func__));
+	KASSERT((m->m_flags & M_NOFREE) == 0, ("freeing embedded mbuf"));
 #ifdef INVARIANTS
 	trash_dtor(mem, size, arg);
 #endif
@@ -534,7 +535,8 @@
 	m->m_len = 0;
 	m->m_flags = (flags | M_EXT);
 	m->m_type = type;
-
+	m->m_ext.ref_cnt = NULL; /* lazy refcnt */
+	
 	if (flags & M_PKTHDR) {
 		m->m_pkthdr.rcvif = NULL;
 		m->m_pkthdr.len = 0;



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200709240454.l8O4s9Sw090390>