summaryrefslogtreecommitdiffstats
path: root/sys/kern/uipc_cow.c
diff options
context:
space:
mode:
authoralc <alc@FreeBSD.org>2003-04-11 07:02:36 +0000
committeralc <alc@FreeBSD.org>2003-04-11 07:02:36 +0000
commitae179e006f3631f2c4268b0b04501fde5a2771fc (patch)
tree7dfdca5570450d5e2a8ca869e82d9a0a2e36eb46 /sys/kern/uipc_cow.c
parentd3e0edc5238bf42afd615b6f6d6e6645ef554e6f (diff)
downloadFreeBSD-src-ae179e006f3631f2c4268b0b04501fde5a2771fc.zip
FreeBSD-src-ae179e006f3631f2c4268b0b04501fde5a2771fc.tar.gz
The data in an sf_buf should not be modified by the mbuf system. Mark
the mbuf as read only. Reviewed by: gallatin
Diffstat (limited to 'sys/kern/uipc_cow.c')
-rw-r--r--sys/kern/uipc_cow.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/sys/kern/uipc_cow.c b/sys/kern/uipc_cow.c
index 2efe903..5611672 100644
--- a/sys/kern/uipc_cow.c
+++ b/sys/kern/uipc_cow.c
@@ -144,7 +144,7 @@ socow_setup(struct mbuf *m0, struct uio *uio)
*/
m0->m_data = (caddr_t)sf->kva;
m0->m_len = PAGE_SIZE;
- MEXTADD(m0, sf->kva, PAGE_SIZE, socow_iodone, sf, 0, EXT_SFBUF);
+ MEXTADD(m0, sf->kva, PAGE_SIZE, socow_iodone, sf, M_RDONLY, EXT_SFBUF);
socow_stats.success++;
iov = uio->uio_iov;
OpenPOWER on IntegriCloud