summaryrefslogtreecommitdiff
path: root/vm
diff options
context:
space:
mode:
authorJustus Winter <justus@gnupg.org>2016-10-21 17:23:06 +0200
committerJustus Winter <justus@gnupg.org>2016-10-21 17:59:18 +0200
commit260d0254d3dd8b2cb0b062a255f1c4201566b5a8 (patch)
tree7f3938e2d64be26e9b86badc08571d7ea2b826bd /vm
parent834a883acdbdfa3fc93a9b635d20f4d636a1be41 (diff)
Gracefully handle pmap allocation failures.
* kern/task.c (task_create): Gracefully handle pmap allocation failures. * vm/vm_map.c (vm_map_fork): Likewise.
Diffstat (limited to 'vm')
-rw-r--r--vm/vm_map.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/vm/vm_map.c b/vm/vm_map.c
index 249d18a4..b8a3ade7 100644
--- a/vm/vm_map.c
+++ b/vm/vm_map.c
@@ -4127,6 +4127,9 @@ vm_map_t vm_map_fork(vm_map_t old_map)
vm_size_t entry_size;
vm_object_t object;
+ if (new_pmap == PMAP_NULL)
+ return VM_MAP_NULL;
+
vm_map_lock(old_map);
new_map = vm_map_create(new_pmap,