summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorjhb <jhb@FreeBSD.org>2004-02-02 23:23:48 +0000
committerjhb <jhb@FreeBSD.org>2004-02-02 23:23:48 +0000
commitab91a458035a9f342fafd060c7603655e19034c4 (patch)
tree65a641b7ae28d16d30e0f9730386970692fc1c19
parent26a88b02fc1135ee880178dc9cfe4d6c411720f5 (diff)
downloadFreeBSD-src-ab91a458035a9f342fafd060c7603655e19034c4.zip
FreeBSD-src-ab91a458035a9f342fafd060c7603655e19034c4.tar.gz
Drop the reference count on the old vmspace after fully switching the
current thread to the new vmspace. Suggested by: dillon
-rw-r--r--sys/vm/vm_map.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/sys/vm/vm_map.c b/sys/vm/vm_map.c
index 0917e54..f06fd78 100644
--- a/sys/vm/vm_map.c
+++ b/sys/vm/vm_map.c
@@ -2794,9 +2794,9 @@ vmspace_exec(struct proc *p, vm_offset_t minuser, vm_offset_t maxuser)
*/
p->p_vmspace = newvmspace;
pmap_pinit2(vmspace_pmap(newvmspace));
- vmspace_free(oldvmspace);
if (p == curthread->td_proc) /* XXXKSE ? */
pmap_activate(curthread);
+ vmspace_free(oldvmspace);
}
/*
@@ -2815,9 +2815,9 @@ vmspace_unshare(struct proc *p)
newvmspace = vmspace_fork(oldvmspace);
p->p_vmspace = newvmspace;
pmap_pinit2(vmspace_pmap(newvmspace));
- vmspace_free(oldvmspace);
if (p == curthread->td_proc) /* XXXKSE ? */
pmap_activate(curthread);
+ vmspace_free(oldvmspace);
}
/*
OpenPOWER on IntegriCloud