Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 28 Apr 2012 18:46:48 +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-9@freebsd.org
Subject:   svn commit: r234767 - stable/9/sys/vm
Message-ID:  <201204281846.q3SIkmZ1075385@svn.freebsd.org>

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



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