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.