freebsd-src/sys/fs
Rick Macklem b484bcd504 nfscl: Fix handling of a copyout() error reply
If vfs.nfs.nfs_directio_enable is set non-zero (the default is
zero) and a file on an NFS mount is read after being opened
with O_DIRECT | O_ RDONLY, a call to nfsm_mbufuio() calls
copyout() without checking for an error return.
If copyout() returns EFAULT, this would not work correctly.

Only the call path
 VOP_READ()->ncl_readrpc()->nfsrpc_read()->nfsrpc_readrpc()
will do this and the error return for EFAULT will
be returned back to VOP_READ().

This patch adds the error check to nfsm_mbufuio().

Reviewed by:	markj
Differential Revision:	https://reviews.freebsd.org/D43160
2023-12-22 12:11:22 -08:00
..
autofs sys: Automated cleanup of cdefs and other formatting 2023-11-26 22:24:00 -07:00
cd9660 sys: Automated cleanup of cdefs and other formatting 2023-11-26 22:24:00 -07:00
cuse sys: Remove $FreeBSD$: one-line .c comment pattern 2023-08-16 11:54:24 -06:00
deadfs sys: Remove ancient SCCS tags. 2023-11-26 22:23:30 -07:00
devfs sys: Remove ancient SCCS tags. 2023-11-26 22:23:30 -07:00
ext2fs sys: Remove ancient SCCS tags. 2023-11-26 22:23:30 -07:00
fdescfs sys: Remove ancient SCCS tags. 2023-11-26 22:23:30 -07:00
fifofs sys: Remove ancient SCCS tags. 2023-11-26 22:23:30 -07:00
fuse vn_copy_file_range(): provide ENOSYS fallback to vn_generic_copy_file_range() 2023-11-28 19:32:53 +02:00
mntfs sys: Remove $FreeBSD$: two-line .h pattern 2023-08-16 11:54:11 -06:00
msdosfs sys: Automated cleanup of cdefs and other formatting 2023-11-26 22:24:00 -07:00
nfs nfscl: Fix handling of a copyout() error reply 2023-12-22 12:11:22 -08:00
nfsclient nfsclient: Propagate copyin() errors from nfsm_uiombuf() 2023-12-12 14:05:24 -05:00
nfsserver sys: Automated cleanup of cdefs and other formatting 2023-11-26 22:24:00 -07:00
nullfs nullfs: do not allow bypass on copy_file_range() 2023-11-28 19:32:53 +02:00
procfs sys: Automated cleanup of cdefs and other formatting 2023-11-26 22:24:00 -07:00
pseudofs pseudofs: fix off by one in hash iteration in pfs_purge 2023-11-20 05:57:25 +00:00
smbfs sys: Remove $FreeBSD$: two-line .h pattern 2023-08-16 11:54:11 -06:00
tarfs vfs: use __enum_uint8 for vtype and vstate 2023-07-05 15:06:30 +00:00
tmpfs tmpfs: increase memory reserve to a percent of available memory + swap 2023-12-19 09:33:33 -06:00
udf sys: Automated cleanup of cdefs and other formatting 2023-11-26 22:24:00 -07:00
unionfs sys: Remove ancient SCCS tags. 2023-11-26 22:23:30 -07:00