diff options
author | Alan Cox <alc@FreeBSD.org> | 2002-04-05 00:52:15 +0000 |
---|---|---|
committer | Alan Cox <alc@FreeBSD.org> | 2002-04-05 00:52:15 +0000 |
commit | aa4d062142bc39b8574313bb8e24c70b48a44bca (patch) | |
tree | 947cd1208f44955f307ee130a546fdd3f815f9d1 /sys/alpha/osf1 | |
parent | 1bbfb90c3c00c33024b3c92f503bdd104a0ab00d (diff) | |
download | src-aa4d062142bc39b8574313bb8e24c70b48a44bca.tar.gz src-aa4d062142bc39b8574313bb8e24c70b48a44bca.zip |
o Eliminate the use of grow_stack() and useracc() from sendsig(), osendsig(),
and osf1_sendsig().
o Eliminate the prototype for the MD grow_stack() now that it has been removed
from all platforms.
Notes
Notes:
svn path=/head/; revision=93847
Diffstat (limited to 'sys/alpha/osf1')
-rw-r--r-- | sys/alpha/osf1/osf1_signal.c | 29 |
1 files changed, 13 insertions, 16 deletions
diff --git a/sys/alpha/osf1/osf1_signal.c b/sys/alpha/osf1/osf1_signal.c index 61803e7b6150..67ae47d3526d 100644 --- a/sys/alpha/osf1/osf1_signal.c +++ b/sys/alpha/osf1/osf1_signal.c @@ -616,21 +616,6 @@ osf1_sendsig(sig_t catcher, int sig, sigset_t *mask, u_long code) sip = (osiginfo_t *)(alpha_pal_rdusp() - rndfsize); PROC_UNLOCK(p); - (void)grow_stack(p, (u_long)sip); - if (useracc((caddr_t)sip, fsize, VM_PROT_WRITE) == 0) { - /* - * Process has trashed its stack; give it an illegal - * instruction to halt it in its tracks. - */ - PROC_LOCK(p); - SIGACTION(p, SIGILL) = SIG_DFL; - SIGDELSET(p->p_sigignore, SIGILL); - SIGDELSET(p->p_sigcatch, SIGILL); - SIGDELSET(p->p_sigmask, SIGILL); - psignal(p, SIGILL); - return; - } - /* * Build the signal context to be used by sigreturn. */ @@ -667,7 +652,19 @@ osf1_sendsig(sig_t catcher, int sig, sigset_t *mask, u_long code) /* * copy the frame out to userland. */ - (void) copyout((caddr_t)&ksi, (caddr_t)sip, fsize); + if (copyout((caddr_t)&ksi, (caddr_t)sip, fsize) != 0) { + /* + * Process has trashed its stack; give it an illegal + * instruction to halt it in its tracks. + */ + PROC_LOCK(p); + SIGACTION(p, SIGILL) = SIG_DFL; + SIGDELSET(p->p_sigignore, SIGILL); + SIGDELSET(p->p_sigcatch, SIGILL); + SIGDELSET(p->p_sigmask, SIGILL); + psignal(p, SIGILL); + return; + } /* * Set up the registers to return to sigcode. |