VM for the kernel stack and page tables doesn't need to be explicitly

deallocated as it isn't inherited across the fork.
Use vm_map_find not vm_allocate.

Submitted by:	John Dyson
This commit is contained in:
David Greenman 1995-02-20 17:26:21 +00:00
parent e8d94d90b8
commit ff16eeefb0
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=6571

View File

@ -59,7 +59,7 @@
* any improvements or extensions that they make and grant Carnegie the
* rights to redistribute these changes.
*
* $Id: vm_glue.c,v 1.14 1995/02/02 09:08:26 davidg Exp $
* $Id: vm_glue.c,v 1.15 1995/02/14 06:11:21 phk Exp $
*/
#include <sys/param.h>
@ -213,11 +213,8 @@ vm_fork(p1, p2, isvfork)
vp = &p2->p_vmspace->vm_map;
/* ream out old pagetables and kernel stack */
(void) vm_deallocate(vp, addr, UPT_MAX_ADDRESS - addr);
/* get new pagetables and kernel stack */
(void) vm_allocate(vp, &addr, UPT_MAX_ADDRESS - addr, FALSE);
(void) vm_map_find(vp, NULL, 0, &addr, UPT_MAX_ADDRESS - addr, FALSE);
/* force in the page table encompassing the UPAGES */
ptaddr = trunc_page((u_int) vtopte(addr));