From 55ac5e18614d716a5c51a82837f4fe4a9a4253d5 Mon Sep 17 00:00:00 2001 From: Robert Watson Date: Wed, 7 Aug 2002 20:15:29 +0000 Subject: [PATCH] Correct a bug introduced in 1.26: M_PKTHDR is set in the 'flags' argument, not the 'type' argument. As a result of the buf, the MAC label on some packet header mbufs might not be set in mbufs allocated using m_getcl(), resulting in a page fault. Obtained from: TrustedBSD Project Sponsored by: DARPA, NAI Labs --- sys/kern/subr_mbuf.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sys/kern/subr_mbuf.c b/sys/kern/subr_mbuf.c index a2111b942bf5..00c5c5f9b57a 100644 --- a/sys/kern/subr_mbuf.c +++ b/sys/kern/subr_mbuf.c @@ -1463,7 +1463,7 @@ m_getcl(int how, short type, int flags) _mext_init_ref(mb, &cl_refcntmap[cl2ref(mb->m_ext.ext_buf)]); } #ifdef MAC - if ((type & M_PKTHDR) && (mac_init_mbuf(mb, how) != 0)) { + if ((flags & M_PKTHDR) && (mac_init_mbuf(mb, how) != 0)) { m_free(mb); return NULL; }