diff options
author | Laurent MEYER <meyerlau@fr.ibm.com> | 2006-03-27 04:37:41 -0500 |
---|---|---|
committer | Paul Mackerras <paulus@samba.org> | 2006-03-28 00:45:24 -0500 |
commit | 11089f08d9dd8b89cd07d6f126ccb4849e3c61a3 (patch) | |
tree | db5780ca34bee26bfcb1bbbdb8a2a3ab71c14b5a /arch | |
parent | 5149fa47ec90eb5e79e28f3a7fbcf29421524817 (diff) |
[PATCH] powerpc: fix incorrect SA_ONSTACK behaviour for 64-bit processes
*) When setting a sighandler using sigaction() call, if the flag
SA_ONSTACK is set and no alternate stack is provided via sigaltstack(),
the kernel still try to install the alternate stack. This behavior is
the opposite of the one which is documented in Single Unix
Specifications V3.
*) Also when setting an alternate stack using sigaltstack() with the
flag SS_DISABLE, the kernel try to install the alternate stack on
signal delivery.
These two use cases makes the process crash at signal delivery.
This fixes it.
Signed-off-by: Laurent Meyer <meyerlau@fr.ibm.com>
Signed-off-by: Paul Mackerras <paulus@samba.org>
Diffstat (limited to 'arch')
-rw-r--r-- | arch/powerpc/kernel/signal_64.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/arch/powerpc/kernel/signal_64.c b/arch/powerpc/kernel/signal_64.c index 82ec2f3f6713..27f65b95184d 100644 --- a/arch/powerpc/kernel/signal_64.c +++ b/arch/powerpc/kernel/signal_64.c | |||
@@ -212,7 +212,7 @@ static inline void __user * get_sigframe(struct k_sigaction *ka, struct pt_regs | |||
212 | /* Default to using normal stack */ | 212 | /* Default to using normal stack */ |
213 | newsp = regs->gpr[1]; | 213 | newsp = regs->gpr[1]; |
214 | 214 | ||
215 | if (ka->sa.sa_flags & SA_ONSTACK) { | 215 | if ((ka->sa.sa_flags & SA_ONSTACK) && current->sas_ss_size) { |
216 | if (! on_sig_stack(regs->gpr[1])) | 216 | if (! on_sig_stack(regs->gpr[1])) |
217 | newsp = (current->sas_ss_sp + current->sas_ss_size); | 217 | newsp = (current->sas_ss_sp + current->sas_ss_size); |
218 | } | 218 | } |