freebsd-nq/sys
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
..
amd64 Enable the new instructions for reading and writing bases for %fs, 2012-11-01 15:17:43 +00:00
arm Fix build for SMP. 2012-11-01 12:26:31 +00:00
boot Fix loader crash when some unhalted exception happens during include 2012-10-26 16:32:20 +00:00
bsm
cam Use M_ZERO instead of explicit memsets and bzeros. 2012-10-30 12:52:41 +00:00
cddl s/dettach/detach/g 2012-10-30 01:29:45 +00:00
compat The r241025 fixed the case when a binary, executed from nullfs mount, 2012-11-02 13:56:36 +00:00
conf Small textdump enhancements. 2012-11-01 04:07:08 +00:00
contrib Handle the management port on the EBT5600 and disable loopback. The XAUI 2012-11-01 03:45:33 +00:00
crypto Revert previous commit... 2012-10-10 08:36:38 +00:00
ddb Small textdump enhancements. 2012-11-01 04:07:08 +00:00
dev - If DRM_DEBUG_DEFAULT_ON is defined, then initialize drm_debug_flagi to 2012-11-02 05:26:33 +00:00
fs The r241025 fixed the case when a binary, executed from nullfs mount, 2012-11-02 13:56:36 +00:00
gdb
geom Provide a device name in the sysctl tree for programs to query the 2012-11-01 17:01:05 +00:00
gnu/fs Add an unified macro to deny ability from the compiler to reorder 2012-10-09 14:32:30 +00:00
i386 The r241025 fixed the case when a binary, executed from nullfs mount, 2012-11-02 13:56:36 +00:00
ia64 Fix compilation on ia64 when page size is configured for 16KB. 2012-10-28 11:53:54 +00:00
isa
kern The r241025 fixed the case when a binary, executed from nullfs mount, 2012-11-02 13:56:36 +00:00
kgssapi
libkern s/ is is / is /g 2012-09-14 22:00:03 +00:00
mips Drop this from 500 to 128, to save a little space on memory constrained 2012-11-02 05:23:05 +00:00
modules Extend dim's hack from r228978: not only clang but gcc on non-x86 platforms 2012-10-28 02:15:35 +00:00
net Remove the recently added sysctl variable net.pfil.forward. 2012-11-02 01:20:55 +00:00
net80211 Add some further BAR TX debugging; it was useful when figuring out 2012-10-28 04:18:49 +00:00
netatalk
netgraph Switch the entire IPv4 stack to keep the IP packet header 2012-10-22 21:09:03 +00:00
netinet Remove the recently added sysctl variable net.pfil.forward. 2012-11-02 01:20:55 +00:00
netinet6 Remove the recently added sysctl variable net.pfil.forward. 2012-11-02 01:20:55 +00:00
netipsec Do not reduce ip_len by size of IP header in the ip_input() 2012-10-23 08:33:13 +00:00
netipx
netnatm
netncp Add characters mapping for codepages used in Germany. 2012-06-01 03:59:08 +00:00
netpfil Remove the recently added sysctl variable net.pfil.forward. 2012-11-02 01:20:55 +00:00
netsmb Fix panic due to page faults while in kernel mode, under conditions of 2012-10-31 03:34:07 +00:00
nfs Add two new options to the nfssvc(2) syscall that allow 2012-10-14 22:33:17 +00:00
nfsclient Do not leave invalid pages in the object after the short read for a 2012-08-14 11:45:47 +00:00
nfsserver Remove the support for using non-mpsafe filesystem modules. 2012-10-22 17:50:54 +00:00
nlm Remove the support for using non-mpsafe filesystem modules. 2012-10-22 17:50:54 +00:00
ofed remove duplicate semicolons where possible. 2012-10-22 03:00:37 +00:00
opencrypto Revert previous commit... 2012-10-10 08:36:38 +00:00
pc98 The 'testing memory' patch gets printed too many times 2012-10-22 11:57:26 +00:00
pci
powerpc Work around broken device tree on last-generation PowerPC iMacs 2012-10-29 14:27:28 +00:00
rpc Modify the comment to take out the names and URL. 2012-10-25 19:30:58 +00:00
security Remove the support for using non-mpsafe filesystem modules. 2012-10-22 17:50:54 +00:00
sparc64 - Give PIL_PREEMPT the lowest priority just above low/stray interrupts. 2012-10-20 12:07:48 +00:00
sys Provide a device name in the sysctl tree for programs to query the 2012-11-01 17:01:05 +00:00
teken
tools Revert previous commit... 2012-10-10 08:36:38 +00:00
ufs The r241025 fixed the case when a binary, executed from nullfs mount, 2012-11-02 13:56:36 +00:00
vm The r241025 fixed the case when a binary, executed from nullfs mount, 2012-11-02 13:56:36 +00:00
x86 Provide the reading and display of the Standard Extended Features, 2012-11-01 15:14:37 +00:00
xdr
xen Move the corresponding MTX_SYSINIT() next to their struct mtx declaration 2012-10-26 17:31:35 +00:00
Makefile