summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorkettenis <kettenis@openbsd.org>2007-07-14 22:41:54 +0000
committerkettenis <kettenis@openbsd.org>2007-07-14 22:41:54 +0000
commit5e98989831d6984bd9b436339099e99dafa42d5e (patch)
tree7b340ed5399e8bf4316023298924e1ad28e0a5cd
parent- there's no point in running mkfontdir only for @fontdir ; so let's run (diff)
downloadwireguard-openbsd-5e98989831d6984bd9b436339099e99dafa42d5e.tar.xz
wireguard-openbsd-5e98989831d6984bd9b436339099e99dafa42d5e.zip
Make sigreturn(2) set the proper space ID for the instruction queue. Fixes
a few more pthreads regression tests. ok miod@
-rw-r--r--sys/arch/hppa/hppa/machdep.c10
1 files changed, 9 insertions, 1 deletions
diff --git a/sys/arch/hppa/hppa/machdep.c b/sys/arch/hppa/hppa/machdep.c
index 0628ebd1237..a8b5aae457d 100644
--- a/sys/arch/hppa/hppa/machdep.c
+++ b/sys/arch/hppa/hppa/machdep.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: machdep.c,v 1.160 2007/07/10 17:28:32 kettenis Exp $ */
+/* $OpenBSD: machdep.c,v 1.161 2007/07/14 22:41:54 kettenis Exp $ */
/*
* Copyright (c) 1999-2003 Michael Shalayeff
@@ -1434,6 +1434,14 @@ sys_sigreturn(p, v, retval)
tf->tf_iioq_head = ksc.sc_pcoqh | HPPA_PC_PRIV_USER;
tf->tf_iioq_tail = ksc.sc_pcoqt | HPPA_PC_PRIV_USER;
+ if ((tf->tf_iioq_head & ~PAGE_MASK) == SYSCALLGATE)
+ tf->tf_iisq_head = HPPA_SID_KERNEL;
+ else
+ tf->tf_iisq_head = p->p_addr->u_pcb.pcb_space;
+ if ((tf->tf_iioq_tail & ~PAGE_MASK) == SYSCALLGATE)
+ tf->tf_iisq_tail = HPPA_SID_KERNEL;
+ else
+ tf->tf_iisq_tail = p->p_addr->u_pcb.pcb_space;
tf->tf_ipsw = ksc.sc_ps;
#ifdef DEBUG