diff options
author | cperciva <cperciva@FreeBSD.org> | 2010-07-13 02:45:17 +0000 |
---|---|---|
committer | cperciva <cperciva@FreeBSD.org> | 2010-07-13 02:45:17 +0000 |
commit | 1fc7b1a20c780245a0f39d36bbea4da9572be141 (patch) | |
tree | 57f2fdc6f270e9dd28d48ca4a7a65caed14d18cb /sys/kern | |
parent | d9b9231f9bad2009d0e53adbfe7f0579bcd60008 (diff) | |
download | FreeBSD-src-1fc7b1a20c780245a0f39d36bbea4da9572be141.zip FreeBSD-src-1fc7b1a20c780245a0f39d36bbea4da9572be141.tar.gz |
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
Diffstat (limited to 'sys/kern')
-rw-r--r-- | sys/kern/uipc_mbuf.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/sys/kern/uipc_mbuf.c b/sys/kern/uipc_mbuf.c index 85e0e39..71ee398 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; } /* |