diff options
author | 2020-11-07 16:12:20 +0000 | |
---|---|---|
committer | 2020-11-07 16:12:20 +0000 | |
commit | 07ac82e8011460c4af81ea31136e7774dfa7e38e (patch) | |
tree | 9db34bc6216e7f4fc43d306e6f0449cce2ad525f /sys | |
parent | Set TCP option NODELAY in relayd and in client and server. This (diff) | |
download | wireguard-openbsd-07ac82e8011460c4af81ea31136e7774dfa7e38e.tar.xz wireguard-openbsd-07ac82e8011460c4af81ea31136e7774dfa7e38e.zip |
multiple reads of pmap_emulate_reference() don't show any reason for it
to need KERNE_LOCK. Been testing this for about 3 weeks.
Diffstat (limited to 'sys')
-rw-r--r-- | sys/arch/alpha/alpha/trap.c | 10 |
1 files changed, 3 insertions, 7 deletions
diff --git a/sys/arch/alpha/alpha/trap.c b/sys/arch/alpha/alpha/trap.c index 3f22b64d3c6..2fd696df0a5 100644 --- a/sys/arch/alpha/alpha/trap.c +++ b/sys/arch/alpha/alpha/trap.c @@ -1,4 +1,4 @@ -/* $OpenBSD: trap.c,v 1.98 2020/10/27 03:09:08 deraadt Exp $ */ +/* $OpenBSD: trap.c,v 1.99 2020/11/07 16:12:20 deraadt Exp $ */ /* $NetBSD: trap.c,v 1.52 2000/05/24 16:48:33 thorpej Exp $ */ /*- @@ -223,7 +223,7 @@ trap(a0, a1, a2, entry, framep) struct trapframe *framep; { struct proc *p; - int i, gotlock = 0; + int i; u_int64_t ucode; int user; #if defined(DDB) @@ -376,13 +376,10 @@ trap(a0, a1, a2, entry, framep) case ALPHA_MMCSR_FOR: case ALPHA_MMCSR_FOE: case ALPHA_MMCSR_FOW: - KERNEL_LOCK(); if (pmap_emulate_reference(p, a0, user, a1)) { access_type = PROT_EXEC; - gotlock = 1; goto do_fault; } - KERNEL_UNLOCK(); goto out; case ALPHA_MMCSR_INVALTRANS: @@ -427,8 +424,7 @@ do_fault: onfault = p->p_addr->u_pcb.pcb_onfault; p->p_addr->u_pcb.pcb_onfault = 0; - if (!gotlock) - KERNEL_LOCK(); + KERNEL_LOCK(); rv = uvm_fault(map, va, 0, access_type); KERNEL_UNLOCK(); |