cvs commit: src/sys/kern kern_exit.c src/sys/vm vm_extern.h
vm_glue.c vm_map.c vm_map.h vm_meter.c
Tor Egge
tegge at FreeBSD.org
Mon May 29 14:31:35 PDT 2006
tegge 2006-05-29 21:28:56 UTC
FreeBSD src repository
Modified files:
sys/kern kern_exit.c
sys/vm vm_extern.h vm_glue.c vm_map.c vm_map.h
vm_meter.c
Log:
Close race between vmspace_exitfree() and exit1() and races between
vmspace_exitfree() and vmspace_free() which could result in the same
vmspace being freed twice.
Factor out part of exit1() into new function vmspace_exit(). Attach
to vmspace0 to allow old vmspace to be freed earlier.
Add new function, vmspace_acquire_ref(), for obtaining a vmspace
reference for a vmspace belonging to another process. Avoid changing
vmspace refcount from 0 to 1 since that could also lead to the same
vmspace being freed twice.
Change vmtotal() and swapout_procs() to use vmspace_acquire_ref().
Reviewed by: alc
Revision Changes Path
1.289 +2 -29 src/sys/kern/kern_exit.c
1.78 +2 -0 src/sys/vm/vm_extern.h
1.215 +3 -6 src/sys/vm/vm_glue.c
1.374 +91 -16 src/sys/vm/vm_map.c
1.119 +0 -1 src/sys/vm/vm_map.h
1.86 +6 -1 src/sys/vm/vm_meter.c
More information about the cvs-src
mailing list