From a4c9ca4f83a35cda2c014f3e1cbf71c5e2b0ad1a Mon Sep 17 00:00:00 2001 From: Alan Cox Date: Fri, 11 Apr 2003 07:02:36 +0000 Subject: [PATCH] The data in an sf_buf should not be modified by the mbuf system. Mark the mbuf as read only. Reviewed by: gallatin --- sys/kern/uipc_cow.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sys/kern/uipc_cow.c b/sys/kern/uipc_cow.c index 2efe903bd49b..561167247ec8 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;