summaryrefslogtreecommitdiffstats
path: root/sys/kern/subr_mbuf.c
diff options
context:
space:
mode:
authorrwatson <rwatson@FreeBSD.org>2002-08-07 20:15:29 +0000
committerrwatson <rwatson@FreeBSD.org>2002-08-07 20:15:29 +0000
commit2de72eb7f519bca3c85d85d15e40ffb4cda07158 (patch)
treef7f880ea1f0aa5e97bcf8dfb3b01d08f939f8d58 /sys/kern/subr_mbuf.c
parent13ab1d7641b31b78fd50927a763547a793c34817 (diff)
downloadFreeBSD-src-2de72eb7f519bca3c85d85d15e40ffb4cda07158.zip
FreeBSD-src-2de72eb7f519bca3c85d85d15e40ffb4cda07158.tar.gz
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
Diffstat (limited to 'sys/kern/subr_mbuf.c')
-rw-r--r--sys/kern/subr_mbuf.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/sys/kern/subr_mbuf.c b/sys/kern/subr_mbuf.c
index a2111b9..00c5c5f 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;
}
OpenPOWER on IntegriCloud