]> pilppa.com Git - linux-2.6-omap-h63xx.git/commitdiff
[PATCH] s390: alternate signal stack handling bug
authorLaurent Meyer <meyerlau@fr.ibm.com>
Fri, 28 Apr 2006 01:40:07 +0000 (18:40 -0700)
committerLinus Torvalds <torvalds@g5.osdl.org>
Fri, 28 Apr 2006 15:33:47 +0000 (08:33 -0700)
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 <meyerlau@fr.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
arch/s390/kernel/compat_signal.c

index 5291b5f8788db723d8464483d1fafaccd9d3ac7c..b4c815d8ef75f0e00dc2cf94a599440709f9e584 100644 (file)
@@ -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;
        }