Do not try to unmark MAP_ENTRY_IN_TRANSITION marked by other thread.
authorkib <kib@FreeBSD.org>
Sat, 24 Jun 2017 16:47:41 +0000 (16:47 +0000)
committerkib <kib@FreeBSD.org>
Sat, 24 Jun 2017 16:47:41 +0000 (16:47 +0000)
commiteb2cba616aaa0b185db6b2caa54f4b49c49e2a26
tree65402bd5ce37bd0493e95b7fa65ec751256d5f5f
parentce5917c18f226b6ff52fc5a77e53601bb91c1c60
Do not try to unmark MAP_ENTRY_IN_TRANSITION marked by other thread.

The issue is catched by "vm_map_wire: alien wire" KASSERT at the end
of the vm_map_wire().  We currently check for MAP_ENTRY_WIRE_SKIPPED
flag before ensuring that the wiring_thread is curthread. For HOLESOK
wiring, this means that we might see WIRE_SKIPPED entry from different
wiring.

The fix it by only checking WIRE_SKIPPED if the entry is put
IN_TRANSITION by us.  Also fixed a typo in the comment explaining the
situation.

Reported and tested by: pho
Reviewed by: alc
Sponsored by: The FreeBSD Foundation
MFC after: 1 week
sys/vm/vm_map.c