Backout previous "Unwire with map lock held" (commitid: SsVz7dLGFgR21kFe)
authorkn <kn@openbsd.org>
Tue, 15 Feb 2022 11:54:19 +0000 (11:54 +0000)
committerkn <kn@openbsd.org>
Tue, 15 Feb 2022 11:54:19 +0000 (11:54 +0000)
The (known) lock order reversals which now occur more reliably and much
earlier on WITNESS boots with this diff knock out syzcaller reports since
syzcaller stops at the first "crash report":
https://syzkaller.appspot.com/bug?id=81b39e970cd2eb21b97d1b31746c693e300fd2dd

sys/uvm/uvm_map.c

index 6cb8b05..ab11402 100644 (file)
@@ -1,4 +1,4 @@
-/*     $OpenBSD: uvm_map.c,v 1.287 2022/02/14 21:11:02 kn Exp $        */
+/*     $OpenBSD: uvm_map.c,v 1.288 2022/02/15 11:54:19 kn Exp $        */
 /*     $NetBSD: uvm_map.c,v 1.86 2000/11/27 08:40:03 chs Exp $ */
 
 /*
@@ -3681,9 +3681,7 @@ uvmspace_free(struct vmspace *vm)
                        shmexit(vm);
 #endif
 
-               vm_map_lock(&vm->vm_map);
                uvm_map_teardown(&vm->vm_map);
-               vm_map_unlock(&vm->vm_map);
                pool_put(&uvm_vmspace_pool, vm);
        }
 }