From 9582cd94cb3d1ebb7f0a8605bafb45344a8dfd90 Mon Sep 17 00:00:00 2001 From: Alan Cox Date: Mon, 22 Dec 2003 02:04:08 +0000 Subject: [PATCH] - Create an unmapped guard page to trap access to vm_page_array[-1]. This guard page would have trapped the problems with the MFC of the PAE support to RELENG_4 at an earlier point in the sequence of events. Submitted by: tegge --- sys/vm/vm_page.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/sys/vm/vm_page.c b/sys/vm/vm_page.c index 401559370b3..9290a6a7757 100644 --- a/sys/vm/vm_page.c +++ b/sys/vm/vm_page.c @@ -241,6 +241,11 @@ vm_page_startup(vm_offset_t starta, vm_offset_t enda, vm_offset_t vaddr) (end - new_end)) / PAGE_SIZE; end = new_end; + /* + * Reserve an unmapped guard page to trap access to vm_page_array[-1]. + */ + vaddr += PAGE_SIZE; + /* * Initialize the mem entry structures now, and put them in the free * queue.