HomeFreeBSD

nfscl: Fix IO_APPEND writes from kernel space

Description

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

Details

Provenance
rmacklemAuthored on Mar 28 2022, 10:11 PM
Parents
rGf5138631fb6f: uudecode: use SRCDIR in the regression test
Branches
Unknown
Tags
Unknown