summaryrefslogtreecommitdiffstats
path: root/sys
diff options
context:
space:
mode:
authorkettenis <kettenis@openbsd.org>2011-05-10 11:11:56 +0000
committerkettenis <kettenis@openbsd.org>2011-05-10 11:11:56 +0000
commit9221b3146048b33aa11db604448e2401c7d251b0 (patch)
treeceea96a17cdc58f334b386c8d30926b39e31e614 /sys
parentrevert a mistake commit (diff)
downloadwireguard-openbsd-9221b3146048b33aa11db604448e2401c7d251b0.tar.xz
wireguard-openbsd-9221b3146048b33aa11db604448e2401c7d251b0.zip
Fix deadlock (re)introduced by the previous commit by explicitly re-enabling
interrupts in the code that cleans up after we fault during return to user mode. Handling traps with interrupts blocked is *not* ok! ok krw@
Diffstat (limited to 'sys')
-rw-r--r--sys/arch/i386/i386/locore.s4
1 files changed, 3 insertions, 1 deletions
diff --git a/sys/arch/i386/i386/locore.s b/sys/arch/i386/i386/locore.s
index a4936ee763b..dfd962a6721 100644
--- a/sys/arch/i386/i386/locore.s
+++ b/sys/arch/i386/i386/locore.s
@@ -1,4 +1,4 @@
-/* $OpenBSD: locore.s,v 1.134 2011/04/27 11:30:53 bluhm Exp $ */
+/* $OpenBSD: locore.s,v 1.135 2011/05/10 11:11:56 kettenis Exp $ */
/* $NetBSD: locore.s,v 1.145 1996/05/03 19:41:19 christos Exp $ */
/*-
@@ -1461,6 +1461,7 @@ IDTVEC(align)
* This will cause the process to get a SIGBUS.
*/
NENTRY(resume_iret)
+ sti
ZTRAP(T_PROTFLT)
NENTRY(resume_pop_ds)
pushl %es
@@ -1476,6 +1477,7 @@ NENTRY(resume_pop_gs)
movw %ax,%fs
NENTRY(resume_pop_fs)
movl $T_PROTFLT,TF_TRAPNO(%esp)
+ sti
jmp calltrap
NENTRY(alltraps)