freebsd-skq/sys/i386
kib f16ea99007 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
..
acpica This isn't functionally identical. In some cases a hint to disable 2012-10-22 13:06:09 +00:00
bios This isn't functionally identical. In some cases a hint to disable 2012-10-22 13:06:09 +00:00
compile
conf Add the mps(4) driver to the i386 GENERIC config file. LSI has tested it 2012-10-01 21:42:32 +00:00
i386 Add missed sched_pin(). 2012-10-24 18:21:22 +00:00
ibcs2 The r241025 fixed the case when a binary, executed from nullfs mount, 2012-11-02 13:56:36 +00:00
include Add an unified macro to deny ability from the compiler to reorder 2012-10-09 14:32:30 +00:00
isa Revert previous commit... 2012-10-10 08:36:38 +00:00
linux Revert previous commit... 2012-10-10 08:36:38 +00:00
pci pciereg_cfg*: use assembly to access the mem-mapped cfg space 2012-10-14 10:13:50 +00:00
svr4 Change some movl's to mov's. Newer GAS no longer accept 'movl' instructions 2009-01-31 11:37:21 +00:00
xbox Move the legacy(4) driver to x86. 2012-03-30 19:10:14 +00:00
xen Replace all uses of the vm page queues lock by a new R/W lock. 2012-10-12 23:26:00 +00:00
Makefile Delete duplicate tags entry I introduced in -r223901. 2011-07-15 17:27:26 +00:00