diff options
author | Artur Grabowski <art@cvs.openbsd.org> | 1999-04-22 19:37:44 +0000 |
---|---|---|
committer | Artur Grabowski <art@cvs.openbsd.org> | 1999-04-22 19:37:44 +0000 |
commit | 88e8c1c14f258c205aa7f3214b0b8b671ebef8d0 (patch) | |
tree | dfa9a8658d0c156c0bdfbe696ed87e2d61dd8172 /sys/kern/kern_exec.c | |
parent | b6ae49b25a284da1cec96663eea865c7fa24db30 (diff) |
uvmspace_exec can change p_vmspace!
Diffstat (limited to 'sys/kern/kern_exec.c')
-rw-r--r-- | sys/kern/kern_exec.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/sys/kern/kern_exec.c b/sys/kern/kern_exec.c index d4b80aa85d6..5e8f9021114 100644 --- a/sys/kern/kern_exec.c +++ b/sys/kern/kern_exec.c @@ -1,4 +1,4 @@ -/* $OpenBSD: kern_exec.c,v 1.26 1999/02/26 05:05:38 art Exp $ */ +/* $OpenBSD: kern_exec.c,v 1.27 1999/04/22 19:37:43 art Exp $ */ /* $NetBSD: kern_exec.c,v 1.75 1996/02/09 18:59:28 christos Exp $ */ /*- @@ -373,6 +373,10 @@ sys_execve(p, v, retval) /* adjust "active stack depth" for process VSZ */ pack.ep_ssize = len; /* maybe should go elsewhere, but... */ + /* + * Prepare vmspace for remapping. Note that uvmspace_exec can replace + * p_vmspace! + */ #if defined(UVM) uvmspace_exec(p); #else @@ -389,6 +393,7 @@ sys_execve(p, v, retval) VM_MAXUSER_ADDRESS - VM_MIN_ADDRESS); #endif + vm = p->p_vmspace; /* Now map address space */ vm->vm_taddr = (char *)pack.ep_taddr; vm->vm_tsize = btoc(pack.ep_tsize); |