From: Laurent Meyer Date: Fri, 28 Apr 2006 01:40:07 +0000 (-0700) Subject: [PATCH] s390: alternate signal stack handling bug X-Git-Tag: v2.6.17-rc4~122 X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=28f223782bca914ae65d08234c57c2175ecd7f5d;p=linux-2.6 [PATCH] s390: alternate signal stack handling bug If a signal handler has been established with the SA_ONSTACK option but no alternate stack is provided with sigaltstack(), the kernel still tries to install the alternate stack. Also when setting an alternate stack with sigalstack() and the SS_DISABLE flag, the kernel tries to install the alternate stack on signal delivery. Use the correct conditions sas_ss_flags() to check if the alternate stack has to be used. Signed-off-by: Laurent Meyer Signed-off-by: Martin Schwidefsky Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- diff --git a/arch/s390/kernel/compat_signal.c b/arch/s390/kernel/compat_signal.c index 5291b5f878..b4c815d8ef 100644 --- a/arch/s390/kernel/compat_signal.c +++ b/arch/s390/kernel/compat_signal.c @@ -430,7 +430,7 @@ get_sigframe(struct k_sigaction *ka, struct pt_regs * regs, size_t frame_size) /* This is the X/Open sanctioned signal stack switching. */ if (ka->sa.sa_flags & SA_ONSTACK) { - if (! on_sig_stack(sp)) + if (! sas_ss_flags(sp)) sp = current->sas_ss_sp + current->sas_ss_size; }