nfscl: Fix IO_APPEND writes from kernel space
Commit 867c27c23a5c modified the NFS client so that it did IO_APPEND writes directly to the NFS server bypassing the buffer cache, via a call to nfs_directio_write(). Unfortunately, this (very old) function assumed that the uio iov was for user space addresses. As such, a IO_APPEND VOP_WRITE() that was for system space, such as ktrace(1) does, would write bogus data. This patch fixes nfs_directio_write() so that it handles kernel space uio iovs. Reported by: bz Tested by: bz MFC after: 2 weeks
This commit is contained in:
parent
f5138631fb
commit
c1970a7eba
@ -780,7 +780,7 @@ do_sync:
|
||||
uio.uio_iovcnt = 1;
|
||||
uio.uio_offset = uiop->uio_offset;
|
||||
uio.uio_resid = size;
|
||||
uio.uio_segflg = UIO_USERSPACE;
|
||||
uio.uio_segflg = uiop->uio_segflg;
|
||||
uio.uio_rw = UIO_WRITE;
|
||||
uio.uio_td = td;
|
||||
iomode = NFSWRITE_FILESYNC;
|
||||
|
Loading…
x
Reference in New Issue
Block a user