From 455a07fa8e3591c228015821a421b20bd84e3645 Mon Sep 17 00:00:00 2001 From: alc Date: Wed, 14 Jun 2006 17:48:45 +0000 Subject: 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@ --- sys/vm/vm_map.c | 1 + 1 file changed, 1 insertion(+) (limited to 'sys/vm/vm_map.c') diff --git a/sys/vm/vm_map.c b/sys/vm/vm_map.c index 5fa5673..8305584 100644 --- a/sys/vm/vm_map.c +++ b/sys/vm/vm_map.c @@ -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 && -- cgit v1.1