freebsd-dev/sys/cddl/contrib/opensolaris/uts/common
Edward Tomasz Napierala 9280affe16 Fix enforcement of file size limit with O_APPEND on ZFS.
vn_rlimit_fsize takes uio->uio_offset and uio->uio_resid into account
when determining whether given write would exceed RLIMIT_FSIZE.

When APPEND flag is specified, ZFS updates uio->uio_offset to point to the
end of file.

But this happens after a call to vn_rlimit_fsize, so vn_rlimit_fsize check
can be rendered ineffective by thread that opens some file with O_APPEND
and lseeks below RLIMIT_FSIZE before calling write.

Submitted by:	Mateusz Guzik <mjguzik at gmail dot com>
MFC after:	2 weeks
2012-05-22 10:54:42 +00:00
..
ctf
dtrace Implement the D "cpu" variable, which returns curcpu. I have chosen not 2012-04-26 01:07:03 +00:00
fs Fix enforcement of file size limit with O_APPEND on ZFS. 2012-05-22 10:54:42 +00:00
os Finally... Import the latest open-source ZFS version - (SPA) 28. 2011-02-27 19:41:40 +00:00
sys Import illumos changeset 13686:4bc0783f6064 2012-05-10 10:39:45 +00:00
zmod
Makefile.files Finally... Import the latest open-source ZFS version - (SPA) 28. 2011-02-27 19:41:40 +00:00