From: Cristiano Giuffrida Date: Sat, 20 Dec 2014 17:14:27 +0000 (+0100) Subject: vm: Fix vm cloning. X-Git-Url: http://zhaoyanbai.com/repos/%22http:/www.isc.org/icons/zpipe.c?a=commitdiff_plain;h=refs%2Fchanges%2F10%2F3110%2F1;p=minix.git vm: Fix vm cloning. Change-Id: I996410ab1b9628cde797d9e5dd73ed07f13a884b --- diff --git a/minix/servers/vm/rs.c b/minix/servers/vm/rs.c index 0890a4bdf..cde9f89d9 100644 --- a/minix/servers/vm/rs.c +++ b/minix/servers/vm/rs.c @@ -168,11 +168,13 @@ static int rs_memctl_make_vm_instance(struct vmproc *new_vm_vmp) */ flags = 0; verify = FALSE; - r = pt_ptalloc_in_range(&this_vm_vmp->vm_pt, 0, 0, flags, verify); + r = pt_ptalloc_in_range(&this_vm_vmp->vm_pt, + kernel_boot_info.freepde_start, ARCH_VM_DIR_ENTRIES, flags, verify); if(r != OK) { return r; } - r = pt_ptalloc_in_range(&new_vm_vmp->vm_pt, 0, 0, flags, verify); + r = pt_ptalloc_in_range(&new_vm_vmp->vm_pt, + kernel_boot_info.freepde_start, ARCH_VM_DIR_ENTRIES, flags, verify); if(r != OK) { return r; }