summaryrefslogtreecommitdiff
path: root/sys
diff options
context:
space:
mode:
authorTheo de Raadt <deraadt@cvs.openbsd.org>2020-10-19 18:18:16 +0000
committerTheo de Raadt <deraadt@cvs.openbsd.org>2020-10-19 18:18:16 +0000
commit9d1cce4d7f36a4376b7e1aab7d9b99223ee65450 (patch)
tree8f6ee9fb1783cf6fa7468ac70b4bc7ddd227ba8e /sys
parentb3d3313b5ea16171ed23a1fd65c999af13f7668d (diff)
the userland pagefault handler can drop the kernel lock before going
into trapsignal() discussed with kettenis
Diffstat (limited to 'sys')
-rw-r--r--sys/arch/amd64/amd64/trap.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/sys/arch/amd64/amd64/trap.c b/sys/arch/amd64/amd64/trap.c
index df1a4592587..34f7da566d2 100644
--- a/sys/arch/amd64/amd64/trap.c
+++ b/sys/arch/amd64/amd64/trap.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: trap.c,v 1.85 2020/10/19 18:17:38 deraadt Exp $ */
+/* $OpenBSD: trap.c,v 1.86 2020/10/19 18:18:15 deraadt Exp $ */
/* $NetBSD: trap.c,v 1.2 2003/05/04 23:51:56 fvdl Exp $ */
/*-
@@ -184,6 +184,7 @@ upageflttrap(struct trapframe *frame, uint64_t cr2)
KERNEL_UNLOCK();
return 1;
}
+ KERNEL_UNLOCK();
signal = SIGSEGV;
sicode = SEGV_MAPERR;
@@ -202,8 +203,6 @@ upageflttrap(struct trapframe *frame, uint64_t cr2)
}
sv.sival_ptr = (void *)cr2;
trapsignal(p, signal, T_PAGEFLT, sicode, sv);
-
- KERNEL_UNLOCK();
return 1;
}