diff options
author | kib <kib@FreeBSD.org> | 2017-07-01 22:54:52 +0000 |
---|---|---|
committer | kib <kib@FreeBSD.org> | 2017-07-01 22:54:52 +0000 |
commit | 25a411b24efa06d93013cbf7dcb34a6e2f2ee5f4 (patch) | |
tree | 10632b626fb520de745692b77116a899caac35e5 | |
parent | 1494c578229a44776f611bf13e8df5b4bf56d9e2 (diff) | |
download | FreeBSD-src-25a411b24efa06d93013cbf7dcb34a6e2f2ee5f4.zip FreeBSD-src-25a411b24efa06d93013cbf7dcb34a6e2f2ee5f4.tar.gz |
MFC r320316:
Do not try to unmark MAP_ENTRY_IN_TRANSITION marked by other thread.
Approved by: re (gjb)
-rw-r--r-- | sys/vm/vm_map.c | 8 |
1 files 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; |