freebsd-skq/sys/fs
bde 7fe18219e6 In msdosfs_read() and msdosfs_write(), don't check explicitly for
(uio_offset < 0) since this can't happen.  If this happens, then the
general code handles the problem safely (better than before for reading,
returning 0 (EOF) instead of the bogus errno EINVAL, and the same as
before for writing, returning EFBIG).

In msdosfs_read(), don't check for (uio_resid < 0).  msdosfs_write()
already didn't check.

In msdosfs_read(), document in a comment our assumptions that the caller
passed a valid uio_offset and uio_resid.  ffs checks using KASSERT(),
and that is enough sanity checking.  In the same comment, partly document
there is no need to check for the EOVERFLOW case, unlike in ffs where this
case can happen at least in theory.

In msdosfs_write(), add a comment about why the checking of
(uio_resid == 0) is explicit, unlike in ffs.

In msdosfs_write(), check for impossibly large final offsets before
checking if the file size rlimit would be exceeded, so that we don't
have an overflow bug in the rlimit check and are consistent with ffs.
We now return EFBIG instead of EFBIG plus a SIGXFSZ signal if the final
offset would be impossibly large but not so large as to cause overflow.
Overflow normally gave the benign behaviour of no signal.

Approved by:	re (kensmith) (blanket)
2007-08-07 10:35:27 +00:00
..
cd9660 Make insmntque() externally visibile and allow it to fail (e.g. during 2007-03-13 01:50:27 +00:00
coda Make sure we release the control vnode in Coda: 2007-07-20 11:14:51 +00:00
deadfs Below is slightly edited description of the LOR by Tor Egge: 2007-01-22 11:25:22 +00:00
devfs When we do open, we should lock the vnode exclusively. This fixes few races: 2007-07-26 16:58:09 +00:00
fdescfs Replace custom file descriptor array sleep lock constructed using a mutex 2007-04-04 09:11:34 +00:00
fifofs When we do open, we should lock the vnode exclusively. This fixes few races: 2007-07-26 16:58:09 +00:00
hpfs Make insmntque() externally visibile and allow it to fail (e.g. during 2007-03-13 01:50:27 +00:00
msdosfs In msdosfs_read() and msdosfs_write(), don't check explicitly for 2007-08-07 10:35:27 +00:00
ntfs Make insmntque() externally visibile and allow it to fail (e.g. during 2007-03-13 01:50:27 +00:00
nullfs Where I previously removed calls to kdb_enter(), now remove include of 2007-05-29 11:28:28 +00:00
nwfs Change the VOP_OPEN(), vn_open() vnode operation and d_fdopen() cdev operation 2007-06-01 14:33:11 +00:00
portalfs Make insmntque() externally visibile and allow it to fail (e.g. during 2007-03-13 01:50:27 +00:00
procfs Eliminate now-unused SUSER_ALLOWJAIL arguments to priv_check_cred(); in 2007-06-12 00:12:01 +00:00
pseudofs Fix off-by-one error (introduced in r1.60) that had the effect of 2007-06-07 15:04:30 +00:00
smbfs Do proper "locking" for missing vmmeters part. 2007-06-04 21:45:18 +00:00
tmpfs MFp4 - Refine locking to eliminate some potential race/panics: 2007-08-03 06:24:31 +00:00
udf Correct corrupt read when the read starts at a non-aligned offset. 2007-06-11 20:14:44 +00:00
unionfs Revert UF_OPENING workaround for CURRENT. 2007-05-31 11:51:53 +00:00