Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 30 Sep 2014 23:16:27 +0000 (UTC)
From:      Navdeep Parhar <np@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r272336 - head/sys/kern
Message-ID:  <201409302316.s8UNGRLf082395@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: np
Date: Tue Sep 30 23:16:26 2014
New Revision: 272336
URL: http://svnweb.freebsd.org/changeset/base/272336

Log:
  Test for absence of M_NOFREE before attempting to purge the mbuf's tags.
  This will leave more state intact should the assertion go off.
  
  MFC after:	1 month

Modified:
  head/sys/kern/kern_mbuf.c

Modified: head/sys/kern/kern_mbuf.c
==============================================================================
--- head/sys/kern/kern_mbuf.c	Tue Sep 30 23:16:03 2014	(r272335)
+++ head/sys/kern/kern_mbuf.c	Tue Sep 30 23:16:26 2014	(r272336)
@@ -447,9 +447,9 @@ mb_dtor_mbuf(void *mem, int size, void *
 	m = (struct mbuf *)mem;
 	flags = (unsigned long)arg;
 
+	KASSERT((m->m_flags & M_NOFREE) == 0, ("%s: M_NOFREE set", __func__));
 	if ((m->m_flags & M_PKTHDR) && !SLIST_EMPTY(&m->m_pkthdr.tags))
 		m_tag_delete_chain(m, NULL);
-	KASSERT((m->m_flags & M_NOFREE) == 0, ("%s: M_NOFREE set", __func__));
 #ifdef INVARIANTS
 	trash_dtor(mem, size, arg);
 #endif



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