Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 19 Jun 2017 20:40:59 +0000 (UTC)
From:      Konstantin Belousov <kib@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r320121 - head/sys/vm
Message-ID:  <201706192040.v5JKex7I032901@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: kib
Date: Mon Jun 19 20:40:59 2017
New Revision: 320121
URL: https://svnweb.freebsd.org/changeset/base/320121

Log:
  Ignore the P_SYSTEM process flag, and do not request
  VM_MAP_WIRE_SYSTEM mode when wiring the newly grown stack.
  
  System maps do not create auto-grown stack.  Any stack we handled,
  even for P_SYSTEM, must be for user address space.  P_SYSTEM processes
  with mapped user space is either init(8) or an aio worker attached to
  other user process with aio buffer pointing into stack area.  In either
  case, VM_MAP_WIRE_USER mode should be used.
  
  Noted and reviewed by:	alc
  Sponsored by:	The FreeBSD Foundation
  MFC after:	1 week

Modified:
  head/sys/vm/vm_map.c

Modified: head/sys/vm/vm_map.c
==============================================================================
--- head/sys/vm/vm_map.c	Mon Jun 19 19:27:37 2017	(r320120)
+++ head/sys/vm/vm_map.c	Mon Jun 19 20:40:59 2017	(r320121)
@@ -3891,9 +3891,7 @@ Retry:
 		vm_map_wire(map,
 		    (stack_entry == next_entry) ? addr : addr - grow_amount,
 		    (stack_entry == next_entry) ? stack_entry->start : addr,
-		    (p->p_flag & P_SYSTEM)
-		    ? VM_MAP_WIRE_SYSTEM|VM_MAP_WIRE_NOHOLES
-		    : VM_MAP_WIRE_USER|VM_MAP_WIRE_NOHOLES);
+		    VM_MAP_WIRE_USER | VM_MAP_WIRE_NOHOLES);
 	}
 
 out:



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