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.
This commit is contained in:
tjr 2004-03-23 08:37:34 +00:00
parent 1d9f598c39
commit 1966edfcd2

View File

@ -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