svn commit: r320524 - stable/11/sys/vm

Konstantin Belousov kib at FreeBSD.org
Sat Jul 1 03:33:27 UTC 2017


Author: kib
Date: Sat Jul  1 03:33:26 2017
New Revision: 320524
URL: https://svnweb.freebsd.org/changeset/base/320524

Log:
  MFC r320316:
  Do not try to unmark MAP_ENTRY_IN_TRANSITION marked by other thread.

Modified:
  stable/11/sys/vm/vm_map.c
Directory Properties:
  stable/11/   (props changed)

Modified: stable/11/sys/vm/vm_map.c
==============================================================================
--- stable/11/sys/vm/vm_map.c	Sat Jul  1 03:30:47 2017	(r320523)
+++ stable/11/sys/vm/vm_map.c	Sat Jul  1 03:33:26 2017	(r320524)
@@ -2712,9 +2712,6 @@ done:
 	}
 	for (entry = first_entry; entry != &map->header && entry->start < end;
 	    entry = entry->next) {
-		if ((entry->eflags & MAP_ENTRY_WIRE_SKIPPED) != 0)
-			goto next_entry_done;
-
 		/*
 		 * If VM_MAP_WIRE_HOLESOK was specified, an empty
 		 * space in the unwired region could have been mapped
@@ -2722,7 +2719,7 @@ done:
 		 * pages or draining MAP_ENTRY_IN_TRANSITION.
 		 * Moreover, another thread could be simultaneously
 		 * wiring this new mapping entry.  Detect these cases
-		 * and skip any entries marked as in transition by us.
+		 * and skip any entries marked as in transition not by us.
 		 */
 		if ((entry->eflags & MAP_ENTRY_IN_TRANSITION) == 0 ||
 		    entry->wiring_thread != curthread) {
@@ -2730,6 +2727,9 @@ done:
 			    ("vm_map_wire: !HOLESOK and new/changed entry"));
 			continue;
 		}
+
+		if ((entry->eflags & MAP_ENTRY_WIRE_SKIPPED) != 0)
+			goto next_entry_done;
 
 		if (rv == KERN_SUCCESS) {
 			if (user_wire)


More information about the svn-src-stable-11 mailing list