Reinstate locks around uvm_fault calls from upageflttrap and kpageflttrap
authorsthen <sthen@openbsd.org>
Sun, 20 Jun 2021 10:58:36 +0000 (10:58 +0000)
committersthen <sthen@openbsd.org>
Sun, 20 Jun 2021 10:58:36 +0000 (10:58 +0000)
commitb26de507dd722693b172902f717b5d4950ee6717
tree8865d14d709c2e3ec3bf2d9f0e197304b4545e94
parentebace80c28e0f6c842b014accbacb80c1825da50
Reinstate locks around uvm_fault calls from upageflttrap and kpageflttrap
on i386.  This is a backout of revision 1.152.

Kernel crash with messages printed concurrently from multiple CPUs
occasionally seen during ports build:

"WARNING: SPL NOT LOWERED ON TRAP EXIT"

and these panics

ddb{1}> sh panic
cpu1: uvm_fault(0xd470a0a0, 0xcf9b7000, 0, 1) -> e
cpu3: kernel diagnostic assertion "!_kernel_lock_held()" failed: file "/usr/src/sys/uvm/uvm_map.c", line 2707
sys/arch/i386/i386/trap.c