summaryrefslogtreecommitdiffstats
path: root/sys/vm/vm_map.c
diff options
context:
space:
mode:
authoralc <alc@FreeBSD.org>2006-06-14 17:48:45 +0000
committeralc <alc@FreeBSD.org>2006-06-14 17:48:45 +0000
commit455a07fa8e3591c228015821a421b20bd84e3645 (patch)
tree2dff6c7d61b20fe878693932d132eef3a43a1ecf /sys/vm/vm_map.c
parent12cf40a7a57241368306d308d0b32cf2f5899511 (diff)
downloadFreeBSD-src-455a07fa8e3591c228015821a421b20bd84e3645.zip
FreeBSD-src-455a07fa8e3591c228015821a421b20bd84e3645.tar.gz
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@
Diffstat (limited to 'sys/vm/vm_map.c')
-rw-r--r--sys/vm/vm_map.c1
1 files changed, 1 insertions, 0 deletions
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 &&
OpenPOWER on IntegriCloud