The data in an sf_buf should not be modified by the mbuf system. Mark

the mbuf as read only.

Reviewed by:	gallatin
This commit is contained in:
Alan Cox 2003-04-11 07:02:36 +00:00
parent 15dc847e52
commit a4c9ca4f83
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=113358

View File

@ -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;