From 0d5f19116220da1e7a0df73c804bebeb5efdf862 Mon Sep 17 00:00:00 2001 From: tegge Date: Mon, 29 May 2006 21:28:56 +0000 Subject: 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 --- sys/vm/vm_map.h | 1 - 1 file changed, 1 deletion(-) (limited to 'sys/vm/vm_map.h') diff --git a/sys/vm/vm_map.h b/sys/vm/vm_map.h index cc97a48..de0ab0a 100644 --- a/sys/vm/vm_map.h +++ b/sys/vm/vm_map.h @@ -242,7 +242,6 @@ struct vmspace { caddr_t vm_taddr; /* (c) user virtual address of text */ caddr_t vm_daddr; /* (c) user virtual address of data */ caddr_t vm_maxsaddr; /* user VA at max stack growth */ - int vm_exitingcnt; /* several processes zombied in exit1 */ int vm_refcnt; /* number of references */ }; -- cgit v1.1