freebsd-skq/sys/i386/ibcs2
Konstantin Belousov 140dedb81c The r241025 fixed the case when a binary, executed from nullfs mount,
was still possible to open for write from the lower filesystem.  There
is a symmetric situation where the binary could already has file
descriptors opened for write, but it can be executed from the nullfs
overlay.

Handle the issue by passing one v_writecount reference to the lower
vnode if nullfs vnode has non-zero v_writecount.  Note that only one
write reference can be donated, since nullfs only keeps one use
reference on the lower vnode.  Always use the lower vnode v_writecount
for the checks.

Introduce the VOP_GET_WRITECOUNT to read v_writecount, which is
currently always bypassed to the lower vnode, and VOP_ADD_WRITECOUNT
to manipulate the v_writecount value, which manages a single bypass
reference to the lower vnode.  Caling the VOPs instead of directly
accessing v_writecount provide the fix described in the previous
paragraph.

Tested by:	pho
MFC after:	3 weeks
2012-11-02 13:56:36 +00:00
..
coff.h Convert files to UTF-8 2012-01-15 13:23:18 +00:00
ibcs2_dirent.h
ibcs2_errno.c
ibcs2_errno.h
ibcs2_fcntl.c Improve *access*() parameter name consistency. 2011-11-19 06:35:15 +00:00
ibcs2_fcntl.h
ibcs2_ioctl.c In order to maximize the re-usability of kernel code in user space this 2011-09-16 13:58:51 +00:00
ibcs2_ioctl.h
ibcs2_ipc.c In order to maximize the re-usability of kernel code in user space this 2011-09-16 13:58:51 +00:00
ibcs2_ipc.h
ibcs2_isc_syscall.h
ibcs2_isc_sysent.c Auto-generated code from sys_ prefixing makesyscalls.sh change 2011-09-16 14:04:14 +00:00
ibcs2_isc.c Convert files to UTF-8 2012-01-15 13:23:18 +00:00
ibcs2_misc.c Remove the support for using non-mpsafe filesystem modules. 2012-10-22 17:50:54 +00:00
ibcs2_mount.h
ibcs2_msg.c
ibcs2_other.c In order to maximize the re-usability of kernel code in user space this 2011-09-16 13:58:51 +00:00
ibcs2_proto.h Regenerate system call tables. 2011-11-19 06:36:11 +00:00
ibcs2_signal.c In order to maximize the re-usability of kernel code in user space this 2011-09-16 13:58:51 +00:00
ibcs2_signal.h
ibcs2_socksys.c Use strchr() and strrchr(). 2012-01-02 12:12:10 +00:00
ibcs2_socksys.h
ibcs2_stat.c Use strchr() and strrchr(). 2012-01-02 12:12:10 +00:00
ibcs2_stat.h
ibcs2_statfs.h
ibcs2_stropts.h
ibcs2_syscall.h Regenerate system call tables. 2011-11-19 06:36:11 +00:00
ibcs2_sysent.c Regenerate system call tables. 2011-11-19 06:36:11 +00:00
ibcs2_sysi86.c Convert files to UTF-8 2012-01-15 13:23:18 +00:00
ibcs2_sysvec.c Revert previous commit... 2012-10-10 08:36:38 +00:00
ibcs2_termios.h
ibcs2_time.h
ibcs2_types.h
ibcs2_unistd.h
ibcs2_ustat.h
ibcs2_util.c
ibcs2_util.h
ibcs2_utime.h
ibcs2_utsname.h
ibcs2_xenix_syscall.h
ibcs2_xenix_sysent.c Auto-generated code from sys_ prefixing makesyscalls.sh change 2011-09-16 14:04:14 +00:00
ibcs2_xenix.c Convert files to UTF-8 2012-01-15 13:23:18 +00:00
ibcs2_xenix.h Auto-generated code from sys_ prefixing makesyscalls.sh change 2011-09-16 14:04:14 +00:00
imgact_coff.c The r241025 fixed the case when a binary, executed from nullfs mount, 2012-11-02 13:56:36 +00:00
Makefile
syscalls.conf
syscalls.isc
syscalls.isc.conf
syscalls.master Improve *access*() parameter name consistency. 2011-11-19 06:35:15 +00:00
syscalls.xenix
syscalls.xenix.conf