From owner-cvs-all Tue Feb 5 13:23:23 2002 Delivered-To: cvs-all@freebsd.org Received: from freefall.freebsd.org (freefall.FreeBSD.org [216.136.204.21]) by hub.freebsd.org (Postfix) with ESMTP id BFCD837B426; Tue, 5 Feb 2002 13:23:05 -0800 (PST) Received: (from alfred@localhost) by freefall.freebsd.org (8.11.6/8.11.6) id g15LN5f05643; Tue, 5 Feb 2002 13:23:05 -0800 (PST) (envelope-from alfred) Message-Id: <200202052123.g15LN5f05643@freefall.freebsd.org> From: Alfred Perlstein Date: Tue, 5 Feb 2002 13:23:05 -0800 (PST) To: cvs-committers@FreeBSD.org, cvs-all@FreeBSD.org Subject: cvs commit: src/sys/vm vm_extern.h vm_glue.c vm_map.c vm_map.h src/sys/kern kern_exit.c X-FreeBSD-CVS-Branch: HEAD Sender: owner-cvs-all@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG alfred 2002/02/05 13:23:05 PST Modified files: sys/vm vm_extern.h vm_glue.c vm_map.c vm_map.h sys/kern kern_exit.c Log: Fix a race with free'ing vmspaces at process exit when vmspaces are shared. Also introduce vm_endcopy instead of using pointer tricks when initializing new vmspaces. The race occured because of how the reference was utilized: test vmspace reference, possibly block, decrement reference When sharing a vmspace between multiple processes it was possible for two processes exiting at the same time to test the reference count, possibly block and neither one free because they wouldn't see the other's update. Submitted by: green Revision Changes Path 1.147 +4 -3 src/sys/kern/kern_exit.c 1.51 +1 -0 src/sys/vm/vm_extern.h 1.123 +1 -1 src/sys/vm/vm_glue.c 1.212 +30 -17 src/sys/vm/vm_map.c 1.69 +2 -0 src/sys/vm/vm_map.h To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe cvs-all" in the body of the message