svn commit: r234784 - stable/8/sys/vm

Konstantin Belousov kib at FreeBSD.org
Sun Apr 29 10:04:21 UTC 2012


Author: kib
Date: Sun Apr 29 10:04:20 2012
New Revision: 234784
URL: http://svn.freebsd.org/changeset/base/234784

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/8/sys/vm/vm_mmap.c
Directory Properties:
  stable/8/sys/   (props changed)

Modified: stable/8/sys/vm/vm_mmap.c
==============================================================================
--- stable/8/sys/vm/vm_mmap.c	Sun Apr 29 09:37:02 2012	(r234783)
+++ stable/8/sys/vm/vm_mmap.c	Sun Apr 29 10:04:20 2012	(r234784)
@@ -1435,7 +1435,8 @@ vm_mmap(vm_map_t map, vm_offset_t *addr,
 	 */
 	if ((rv == KERN_SUCCESS) && (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));
 
 	return (vm_mmap_to_errno(rv));
 }


More information about the svn-src-stable mailing list