]> Zhao Yanbai Git Server - minix.git/commitdiff
vm: Fix vm cloning. 10/3110/1
authorCristiano Giuffrida <giuffrida@cs.vu.nl>
Sat, 20 Dec 2014 17:14:27 +0000 (18:14 +0100)
committerDavid van Moolenbroek <david@minix3.org>
Thu, 17 Sep 2015 13:27:24 +0000 (13:27 +0000)
Change-Id: I996410ab1b9628cde797d9e5dd73ed07f13a884b

minix/servers/vm/rs.c

index 0890a4bdfa7f94619364e0185d8881215c01f671..cde9f89d9733fc2bee45e4e191a1b2e22745f243 100644 (file)
@@ -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;
        }