svn commit: r234767 - stable/9/sys/vm
Konstantin Belousov
kib at FreeBSD.org
Sat Apr 28 18:46:49 UTC 2012
Author: kib
Date: Sat Apr 28 18:46:48 2012
New Revision: 234767
URL: http://svn.freebsd.org/changeset/base/234767
Log:
MFC r234556:
When MAP_STACK mapping is created, the map entry is created only to
cover the initial stack size. For MCL_WIREFUTURE maps, the subsequent
call to vm_map_wire() to wire the whole stack region fails due to
VM_MAP_WIRE_NOHOLES flag.
Use the VM_MAP_WIRE_HOLESOK to only wire mapped part of the stack.
Modified:
stable/9/sys/vm/vm_mmap.c
Directory Properties:
stable/9/sys/ (props changed)
Modified: stable/9/sys/vm/vm_mmap.c
==============================================================================
--- stable/9/sys/vm/vm_mmap.c Sat Apr 28 18:43:27 2012 (r234766)
+++ stable/9/sys/vm/vm_mmap.c Sat Apr 28 18:46:48 2012 (r234767)
@@ -1564,9 +1564,11 @@ vm_mmap(vm_map_t map, vm_offset_t *addr,
* If the process has requested that all future mappings
* be wired, then heed this.
*/
- if (map->flags & MAP_WIREFUTURE)
+ if (map->flags & MAP_WIREFUTURE) {
vm_map_wire(map, *addr, *addr + size,
- VM_MAP_WIRE_USER | VM_MAP_WIRE_NOHOLES);
+ VM_MAP_WIRE_USER | ((flags & MAP_STACK) ?
+ VM_MAP_WIRE_HOLESOK : VM_MAP_WIRE_NOHOLES));
+ }
} else {
/*
* If this mapping was accounted for in the vnode's
More information about the svn-src-stable-9
mailing list