From 64acc95d7e60f6b4ba3de6914ca69b8bbed642e2 Mon Sep 17 00:00:00 2001 From: cperciva Date: Tue, 13 Jul 2010 02:45:17 +0000 Subject: [PATCH] Correctly copy the M_RDONLY flag when duplicating a reference to an mbuf external buffer. Approved by: so (cperciva) Approved by: re (kensmith) Security: FreeBSD-SA-10:07.mbuf git-svn-id: svn://svn.freebsd.org/base/releng/8.0@209964 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f --- UPDATING | 4 ++++ sys/conf/newvers.sh | 2 +- sys/kern/uipc_mbuf.c | 1 + 3 files changed, 6 insertions(+), 1 deletion(-) diff --git a/UPDATING b/UPDATING index b326a711..262aab2c 100644 --- a/UPDATING +++ b/UPDATING @@ -15,6 +15,10 @@ NOTE TO PEOPLE WHO THINK THAT FreeBSD 8.x IS SLOW ON IA64 OR SUN4V: debugging tools present in HEAD were left in place because sun4v support still needs work to become production ready. +20100713: p4 FreeBSD-SA-10:07.mbuf + Correctly copy the M_RDONLY flag when duplicating a reference + to an mbuf external buffer. + 20100526: p3 FreeBSD-SA-10:04.jail, FreeBSD-SA-10:05.opie, FreeBSD-SA-10:06.nfsclient Change the current working directory to be inside the jail created by diff --git a/sys/conf/newvers.sh b/sys/conf/newvers.sh index e71b0516..8bdb7593 100644 --- a/sys/conf/newvers.sh +++ b/sys/conf/newvers.sh @@ -32,7 +32,7 @@ TYPE="FreeBSD" REVISION="8.0" -BRANCH="RELEASE-p3" +BRANCH="RELEASE-p4" if [ "X${BRANCH_OVERRIDE}" != "X" ]; then BRANCH=${BRANCH_OVERRIDE} fi diff --git a/sys/kern/uipc_mbuf.c b/sys/kern/uipc_mbuf.c index bc0e88d0..6e43348e 100644 --- a/sys/kern/uipc_mbuf.c +++ b/sys/kern/uipc_mbuf.c @@ -302,6 +302,7 @@ mb_dupcl(struct mbuf *n, struct mbuf *m) n->m_ext.ref_cnt = m->m_ext.ref_cnt; n->m_ext.ext_type = m->m_ext.ext_type; n->m_flags |= M_EXT; + n->m_flags |= m->m_flags & M_RDONLY; } /* -- 2.45.0