diff options
author | alc <alc@FreeBSD.org> | 2003-04-11 07:02:36 +0000 |
---|---|---|
committer | alc <alc@FreeBSD.org> | 2003-04-11 07:02:36 +0000 |
commit | ae179e006f3631f2c4268b0b04501fde5a2771fc (patch) | |
tree | 7dfdca5570450d5e2a8ca869e82d9a0a2e36eb46 /sys/kern/uipc_cow.c | |
parent | d3e0edc5238bf42afd615b6f6d6e6645ef554e6f (diff) | |
download | FreeBSD-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.c | 2 |
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; |