From 21ee3e7affdbbc5b3a0f61e201a49956fe434540 Mon Sep 17 00:00:00 2001 From: Kip Macy Date: Sat, 14 Apr 2007 20:19:16 +0000 Subject: [PATCH] remove now invalid check from m_sanity panic on m_sanity check failure with INVARIANTS --- sys/kern/uipc_mbuf.c | 15 +++++---------- 1 file changed, 5 insertions(+), 10 deletions(-) diff --git a/sys/kern/uipc_mbuf.c b/sys/kern/uipc_mbuf.c index e9ff7b098a7..a6ce50087a4 100644 --- a/sys/kern/uipc_mbuf.c +++ b/sys/kern/uipc_mbuf.c @@ -330,8 +330,11 @@ m_sanity(struct mbuf *m0, int sanitize) caddr_t a, b; int pktlen = 0; -#define M_SANITY_ACTION(s) return (0) -/* #define M_SANITY_ACTION(s) panic("mbuf %p: " s, m) */ +#ifdef INVARIANTS +#define M_SANITY_ACTION(s) panic("mbuf %p: " s, m) +#else +#define M_SANITY_ACTION(s) printf("mbuf %p: " s, m) +#endif for (m = m0; m != NULL; m = m->m_next) { /* @@ -365,14 +368,6 @@ m_sanity(struct mbuf *m0, int sanitize) M_SANITY_ACTION("m->m_nextpkt on in-chain mbuf"); } - /* correct type correlations. */ - if (m->m_type == MT_HEADER && !(m->m_flags & M_PKTHDR)) { - if (sanitize) - m->m_type = MT_DATA; - else - M_SANITY_ACTION("MT_HEADER set but not M_PKTHDR"); - } - /* packet length (not mbuf length!) calculation */ if (m0->m_flags & M_PKTHDR) pktlen += m->m_len;