diff options
author | kmacy <kmacy@FreeBSD.org> | 2007-04-14 20:19:16 +0000 |
---|---|---|
committer | kmacy <kmacy@FreeBSD.org> | 2007-04-14 20:19:16 +0000 |
commit | 6ebe8e3a88904586806ee2c51a5ce3fab206b1fb (patch) | |
tree | 7b50f6090af58fc48c6de3dd25fbf6f1433eadcd /sys/kern | |
parent | 69261f23063068403370053c155b911497247ccd (diff) | |
download | FreeBSD-src-6ebe8e3a88904586806ee2c51a5ce3fab206b1fb.zip FreeBSD-src-6ebe8e3a88904586806ee2c51a5ce3fab206b1fb.tar.gz |
remove now invalid check from m_sanity
panic on m_sanity check failure with INVARIANTS
Diffstat (limited to 'sys/kern')
-rw-r--r-- | sys/kern/uipc_mbuf.c | 15 |
1 files changed, 5 insertions, 10 deletions
diff --git a/sys/kern/uipc_mbuf.c b/sys/kern/uipc_mbuf.c index e9ff7b0..a6ce500 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; |