From 25a411b24efa06d93013cbf7dcb34a6e2f2ee5f4 Mon Sep 17 00:00:00 2001 From: kib Date: Sat, 1 Jul 2017 22:54:52 +0000 Subject: MFC r320316: Do not try to unmark MAP_ENTRY_IN_TRANSITION marked by other thread. Approved by: re (gjb) --- sys/vm/vm_map.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/sys/vm/vm_map.c b/sys/vm/vm_map.c index 083f33a..7fa3203 100644 --- a/sys/vm/vm_map.c +++ b/sys/vm/vm_map.c @@ -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) { @@ -2731,6 +2728,9 @@ done: continue; } + if ((entry->eflags & MAP_ENTRY_WIRE_SKIPPED) != 0) + goto next_entry_done; + if (rv == KERN_SUCCESS) { if (user_wire) entry->eflags |= MAP_ENTRY_USER_WIRED; -- cgit v1.1