From f8c9ad8f51f799003b13e4aab3a3c9ec2fdc91b4 Mon Sep 17 00:00:00 2001 From: Kip Macy Date: Wed, 9 Jan 2008 06:29:49 +0000 Subject: [PATCH] Fix KASSERT in m_free_fast - the LIST_EMPTY check only applies to packet headers. In the non packet header case there may be data there. --- sys/sys/mbuf.h | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/sys/sys/mbuf.h b/sys/sys/mbuf.h index f00471fa58bb..32e271d333f5 100644 --- a/sys/sys/mbuf.h +++ b/sys/sys/mbuf.h @@ -496,8 +496,11 @@ m_getjcl(int how, short type, int flags, int size) static __inline void m_free_fast(struct mbuf *m) { - KASSERT(SLIST_EMPTY(&m->m_pkthdr.tags), ("doing fast free of mbuf with tags")); - +#ifdef INVARIANTS + if (m->m_flags & M_PKTHDR) + KASSERT(SLIST_EMPTY(&m->m_pkthdr.tags), ("doing fast free of mbuf with tags")); +#endif + uma_zfree_arg(zone_mbuf, m, (void *)MB_NOTAGS); }