summaryrefslogtreecommitdiff
path: root/usr/src/uts/sparc/syscall
diff options
context:
space:
mode:
authorRoger A. Faulkner <Roger.Faulkner@Sun.COM>2010-03-22 10:36:28 -0700
committerRoger A. Faulkner <Roger.Faulkner@Sun.COM>2010-03-22 10:36:28 -0700
commit8f798d3afbe38d59cc0a708261dbb729f1b6b209 (patch)
tree0dfef2edb65f223031151d14c82a230d15f6c24d /usr/src/uts/sparc/syscall
parentc694df91a1cf9e8c631e696641c4475968652f40 (diff)
downloadillumos-gate-8f798d3afbe38d59cc0a708261dbb729f1b6b209.tar.gz
6936596 take_deferred_signal() dumps core on solaris10 branded zones
Diffstat (limited to 'usr/src/uts/sparc/syscall')
-rw-r--r--usr/src/uts/sparc/syscall/getcontext.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/usr/src/uts/sparc/syscall/getcontext.c b/usr/src/uts/sparc/syscall/getcontext.c
index 433c29fa9c..437eef5e1a 100644
--- a/usr/src/uts/sparc/syscall/getcontext.c
+++ b/usr/src/uts/sparc/syscall/getcontext.c
@@ -35,6 +35,7 @@
#include <sys/stack.h>
#include <sys/frame.h>
#include <sys/proc.h>
+#include <sys/brand.h>
#include <sys/ucontext.h>
#include <sys/asm_linkage.h>
#include <sys/kmem.h>
@@ -200,6 +201,8 @@ getsetcontext(int flag, void *arg)
case GETCONTEXT:
schedctl_finish_sigblock(curthread);
savecontext(&uc, &curthread->t_hold);
+ if (uc.uc_flags & UC_SIGMASK)
+ SIGSET_NATIVE_TO_BRAND(&uc.uc_sigmask);
/*
* When using floating point it should not be possible to
* get here with a fpu_qcnt other than zero since we go
@@ -233,6 +236,8 @@ getsetcontext(int flag, void *arg)
sizeof (uc.uc_mcontext.filler))) {
return (set_errno(EFAULT));
}
+ if (uc.uc_flags & UC_SIGMASK)
+ SIGSET_BRAND_TO_NATIVE(&uc.uc_sigmask);
if (copyin(&ucp->uc_mcontext.xrs, &uc.uc_mcontext.xrs,
sizeof (uc.uc_mcontext.xrs))) {
return (set_errno(EFAULT));
@@ -446,6 +451,8 @@ getsetcontext32(int flag, void *arg)
case GETCONTEXT:
schedctl_finish_sigblock(curthread);
savecontext32(&uc, &curthread->t_hold, NULL);
+ if (uc.uc_flags & UC_SIGMASK)
+ SIGSET_NATIVE_TO_BRAND(&uc.uc_sigmask);
/*
* When using floating point it should not be possible to
* get here with a fpu_qcnt other than zero since we go
@@ -477,6 +484,8 @@ getsetcontext32(int flag, void *arg)
sizeof (uc.uc_mcontext.filler))) {
return (set_errno(EFAULT));
}
+ if (uc.uc_flags & UC_SIGMASK)
+ SIGSET_BRAND_TO_NATIVE(&uc.uc_sigmask);
if (copyin(&ucp->uc_mcontext.xrs, &uc.uc_mcontext.xrs,
sizeof (uc.uc_mcontext.xrs))) {
return (set_errno(EFAULT));