diff options
author | tjr <tjr@FreeBSD.org> | 2004-03-23 08:37:34 +0000 |
---|---|---|
committer | tjr <tjr@FreeBSD.org> | 2004-03-23 08:37:34 +0000 |
commit | 1966edfcd2bcb480b3bf04207e8a5bdded0ed8ba (patch) | |
tree | a4009a60b99bc8ec79e7f4d7290e535344b87434 /sys/vm/vm_map.c | |
parent | 1d9f598c393032e703ef42b49dd7589627f4b697 (diff) | |
download | FreeBSD-src-1966edfcd2bcb480b3bf04207e8a5bdded0ed8ba.zip FreeBSD-src-1966edfcd2bcb480b3bf04207e8a5bdded0ed8ba.tar.gz |
Do not copy vm_exitingcnt to the new vmspace in vmspace_exec(). Copying
it led to impossibly high values in the new vmspace, causing it to never
drop to 0 and be freed.
Diffstat (limited to 'sys/vm/vm_map.c')
-rw-r--r-- | sys/vm/vm_map.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/sys/vm/vm_map.c b/sys/vm/vm_map.c index d4a7fe6..b5897ed 100644 --- a/sys/vm/vm_map.c +++ b/sys/vm/vm_map.c @@ -2789,7 +2789,8 @@ vmspace_exec(struct proc *p, vm_offset_t minuser, vm_offset_t maxuser) GIANT_REQUIRED; newvmspace = vmspace_alloc(minuser, maxuser); bcopy(&oldvmspace->vm_startcopy, &newvmspace->vm_startcopy, - (caddr_t) (newvmspace + 1) - (caddr_t) &newvmspace->vm_startcopy); + (caddr_t) &newvmspace->vm_endcopy - + (caddr_t) &newvmspace->vm_startcopy); /* * This code is written like this for prototype purposes. The * goal is to avoid running down the vmspace here, but let the |