1
0
mirror of https://git.FreeBSD.org/src.git synced 2024-12-17 10:26:15 +00:00

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
This commit is contained in:
Navdeep Parhar 2014-09-30 23:16:26 +00:00
parent c3f0f2847f
commit a9fa76f27e
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=272336

View File

@ -447,9 +447,9 @@ mb_dtor_mbuf(void *mem, int size, void *arg)
m = (struct mbuf *)mem; m = (struct mbuf *)mem;
flags = (unsigned long)arg; 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)) if ((m->m_flags & M_PKTHDR) && !SLIST_EMPTY(&m->m_pkthdr.tags))
m_tag_delete_chain(m, NULL); m_tag_delete_chain(m, NULL);
KASSERT((m->m_flags & M_NOFREE) == 0, ("%s: M_NOFREE set", __func__));
#ifdef INVARIANTS #ifdef INVARIANTS
trash_dtor(mem, size, arg); trash_dtor(mem, size, arg);
#endif #endif