Correctly handle vm_map_wire()'s failure. (See also revisions 1.81 and
1.82.) Reviewed by: tegge
This commit is contained in:
parent
8e1e510074
commit
5d3043ce9a
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=149544
@ -742,10 +742,14 @@ link_elf_load_file(linker_class_t cls, const char* filename,
|
||||
/*
|
||||
* Wire down the pages
|
||||
*/
|
||||
vm_map_wire(kernel_map,
|
||||
error = vm_map_wire(kernel_map,
|
||||
(vm_offset_t) segbase,
|
||||
(vm_offset_t) segbase + segs[i]->p_memsz,
|
||||
VM_MAP_WIRE_SYSTEM|VM_MAP_WIRE_NOHOLES);
|
||||
if (error != KERN_SUCCESS) {
|
||||
error = ENOMEM;
|
||||
goto out;
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user