1
0
mirror of https://git.FreeBSD.org/src.git synced 2024-12-29 12:03:03 +00:00
freebsd/sys/vm
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
..
default_pager.c
device_pager.c
memguard.c
memguard.h
phys_pager.c
pmap.h
redzone.c
redzone.h
sg_pager.c
swap_pager.c
swap_pager.h
uma_core.c Const-ify the zone name argument to uma_zcreate(9). 2012-10-26 17:51:05 +00:00
uma_dbg.c
uma_dbg.h
uma_int.h Const-ify the zone name argument to uma_zcreate(9). 2012-10-26 17:51:05 +00:00
uma.h Const-ify the zone name argument to uma_zcreate(9). 2012-10-26 17:51:05 +00:00
vm_extern.h
vm_fault.c Commit the actual text provided by Alan, instead of the wrong update 2012-10-24 18:32:37 +00:00
vm_glue.c Move the corresponding MTX_SYSINIT() next to their struct mtx declaration 2012-10-26 17:31:35 +00:00
vm_init.c
vm_kern.c
vm_kern.h
vm_map.c
vm_map.h
vm_meter.c
vm_mmap.c Remove the support for using non-mpsafe filesystem modules. 2012-10-22 17:50:54 +00:00
vm_object.c Remove the support for using non-mpsafe filesystem modules. 2012-10-22 17:50:54 +00:00
vm_object.h
vm_page.c In general, we call pmap_remove_all() before calling vm_page_cache(). So, 2012-11-01 16:20:02 +00:00
vm_page.h Rework the known mutexes to benefit about staying on their own 2012-10-31 18:07:18 +00:00
vm_pageout.c In general, we call pmap_remove_all() before calling vm_page_cache(). So, 2012-11-01 16:20:02 +00:00
vm_pageout.h
vm_pager.c
vm_pager.h
vm_param.h
vm_phys.c
vm_phys.h
vm_reserv.c
vm_reserv.h
vm_unix.c
vm_zeroidle.c
vm.h
vnode_pager.c The r241025 fixed the case when a binary, executed from nullfs mount, 2012-11-02 13:56:36 +00:00
vnode_pager.h