diff options
-rw-r--r-- | console/pager.c | 1 | ||||
-rw-r--r-- | libdiskfs/disk-pager.c | 1 | ||||
-rw-r--r-- | libpager/pager-memcpy.c | 2 | ||||
-rw-r--r-- | tmpfs/node.c | 1 |
4 files changed, 4 insertions, 1 deletions
diff --git a/console/pager.c b/console/pager.c index 3568211e..5e13ba48 100644 --- a/console/pager.c +++ b/console/pager.c @@ -169,6 +169,7 @@ user_pager_create (struct user_pager *user_pager, unsigned int npages, mach_port_insert_right (mach_task_self (), user_pager->memobj, user_pager->memobj, MACH_MSG_TYPE_MAKE_SEND); + *user = 0; err = vm_map (mach_task_self (), (vm_address_t *) user, (vm_size_t) npages * vm_page_size, diff --git a/libdiskfs/disk-pager.c b/libdiskfs/disk-pager.c index 4083ef27..008aa2dc 100644 --- a/libdiskfs/disk-pager.c +++ b/libdiskfs/disk-pager.c @@ -60,6 +60,7 @@ diskfs_start_disk_pager (struct user_pager_info *upi, MACH_MSG_TYPE_MAKE_SEND); /* Now map the disk image. */ + *image = 0; err = vm_map (mach_task_self (), (vm_address_t *)image, size, 0, 1, disk_pager_port, 0, 0, VM_PROT_READ | (diskfs_readonly ? 0 : VM_PROT_WRITE), diff --git a/libpager/pager-memcpy.c b/libpager/pager-memcpy.c index f2be5585..479c06f0 100644 --- a/libpager/pager-memcpy.c +++ b/libpager/pager-memcpy.c @@ -45,7 +45,7 @@ pager_memcpy (struct pager *pager, memory_object_t memobj, #define VMCOPY_WINDOW_DEFAULT_SIZE (32 * vm_page_size) #define MEMCPY_WINDOW_DEFAULT_SIZE (32 * vm_page_size) - vm_address_t window; + vm_address_t window = 0; vm_size_t window_size; error_t do_vm_copy (void) diff --git a/tmpfs/node.c b/tmpfs/node.c index acc029ae..8835e3fd 100644 --- a/tmpfs/node.c +++ b/tmpfs/node.c @@ -508,6 +508,7 @@ diskfs_get_filemap (struct node *np, vm_prot_t prot) /* XXX we need to keep a reference to the object, or GNU Mach will terminate it when we release the map. */ + np->dn->u.reg.memref = 0; vm_map (mach_task_self (), &np->dn->u.reg.memref, 4096, 0, 1, np->dn->u.reg.memobj, 0, 0, VM_PROT_NONE, VM_PROT_NONE, VM_INHERIT_NONE); |