diff options
author | Samuel Thibault <samuel.thibault@ens-lyon.org> | 2014-11-09 22:31:21 +0100 |
---|---|---|
committer | Samuel Thibault <samuel.thibault@ens-lyon.org> | 2014-11-09 22:31:21 +0100 |
commit | 94b2c453829b3aebdaccf7d3d252136b283002b3 (patch) | |
tree | 741fc5b14a62a18f66e349b8234088f59e5c171f /tmpfs | |
parent | 9480792609c779516ac465ac5a038101032be77d (diff) |
Deal with odd kernel behavior
Some versions of gnumach actually take address as a mapping hint, and would fail
if the hint is bogus. Make sure to pass 0 for those versions.
* console/pager.c (user_pager_create): Make sure to set *user to 0 before
calling vm_map.
* libdiskfs/disk-pager.c (diskfs_start_disk_pager): Make sure to set *image to 0
before calling vm_map.
* libpager/pager-memcpy.c (pager_memcpy): Set window to 0 before calling
vm_map.
* tmpfs/node.c (diskfs_get_filemap): Make sure to set np->dn->u.reg.memref to 0
before calling vm_map.
Diffstat (limited to 'tmpfs')
-rw-r--r-- | tmpfs/node.c | 1 |
1 files changed, 1 insertions, 0 deletions
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); |