Correct an error in the previous revision that could lead to a panic:

Found mapped cache page.  Specifically, if cnt.v_free_count dips below
cnt.v_free_reserved after p_start has been set to a non-NULL value,
then vm_map_pmap_enter() would break out of the loop and incorrectly
call pmap_enter_object() for the remaining address range.  To correct
this error, this revision truncates the address range so that
pmap_enter_object() will not map any cache pages.

In collaboration with: tegge@
Reported by: kris@
This commit is contained in:
Alan Cox 2006-06-14 17:48:45 +00:00
parent 89d098f8dd
commit d2d9e24a89

View File

@ -1489,6 +1489,7 @@ vm_map_pmap_enter(vm_map_t map, vm_offset_t addr, vm_prot_t prot,
*/
if ((flags & MAP_PREFAULT_MADVISE) &&
cnt.v_free_count < cnt.v_free_reserved) {
size = ptoa(tmpidx);
break;
}
if ((p->valid & VM_PAGE_BITS_ALL) == VM_PAGE_BITS_ALL &&