svn commit: r320121 - head/sys/vm

Konstantin Belousov kib at FreeBSD.org
Mon Jun 19 20:41:00 UTC 2017


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:


More information about the svn-src-head mailing list