Correctly handle vm_map_wire()'s failure. (See also revisions 1.81 and

1.82.)

Reviewed by:	tegge
This commit is contained in:
Alan Cox 2005-08-28 04:50:11 +00:00
parent 8e1e510074
commit 5d3043ce9a

View File

@ -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
}