Skip to content

Commit

Permalink
[PATCH] s390: alternate signal stack handling bug
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Laurent Meyer authored and Linus Torvalds committed Apr 28, 2006
1 parent 6dcfca7 commit 28f2237
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion arch/s390/kernel/compat_signal.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}

Expand Down

0 comments on commit 28f2237

Please sign in to comment.