Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 29 Apr 2012 10:04:20 +0000 (UTC)
From:      Konstantin Belousov <kib@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org
Subject:   svn commit: r234784 - stable/8/sys/vm
Message-ID:  <201204291004.q3TA4KQt008400@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
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));
 }



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201204291004.q3TA4KQt008400>