]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/commit
Introduce vm_fault_hold() and use it to (1) eliminate a long-standing race
authorAlan Cox <alc@FreeBSD.org>
Mon, 20 Dec 2010 22:49:31 +0000 (22:49 +0000)
committerAlan Cox <alc@FreeBSD.org>
Mon, 20 Dec 2010 22:49:31 +0000 (22:49 +0000)
commitacd11c74999edad48185afb907d5b80e7302c3d1
treef6dd1a0aa7e3213a5adcdd9bdd3123f868ee9dea
parent091c4c86d128d6ded26ff09e99257332cf1d3276
Introduce vm_fault_hold() and use it to (1) eliminate a long-standing race
condition in proc_rwmem() and to (2) simplify the implementation of the
cxgb driver's vm_fault_hold_user_pages().  Specifically, in proc_rwmem()
the requested read or write could fail because the targeted page could be
reclaimed between the calls to vm_fault() and vm_page_hold().

In collaboration with: kib@
MFC after: 6 weeks
sys/dev/cxgb/ulp/tom/cxgb_vm.c
sys/kern/sys_process.c
sys/vm/vm_extern.h
sys/vm/vm_fault.c
sys/vm/vm_map.h