]> git.kernelconcepts.de Git - karo-tx-linux.git/commit
sparc: Fix SA_ONSTACK signal handling.
authorDavid S. Miller <davem@davemloft.net>
Thu, 8 May 2008 01:54:05 +0000 (18:54 -0700)
committerGreg Kroah-Hartman <gregkh@suse.de>
Thu, 15 May 2008 14:50:00 +0000 (07:50 -0700)
commit742de58a7b519a51ea77153b6e053223eb6ccbaf
treea91b8caa8abfe155e7848bfd28f7a97e41a23d80
parent970a75dcfa7fd55dd911830d8772dbbf471c154d
sparc: Fix SA_ONSTACK signal handling.

[ Upstream commit: dc5dc7e6d71ca9fd1ea01a1418150af3b2937489 ]

We need to be more liberal about the alignment of the buffer given to
us by sigaltstack().  The user should not need to be mindful of all of
the alignment constraints we have for the stack frame.

This mirrors how we handle this situation in clone() as well.

Also, we align the stack even in non-SA_ONSTACK cases so that signals
due to bad stack alignment can be delivered properly.  This makes such
errors easier to debug and recover from.

Finally, add the sanity check x86 has to make sure we won't overflow
the signal stack.

This fixes glibc testcases nptl/tst-cancel20.c and
nptl/tst-cancelx20.c

Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
arch/sparc/kernel/signal.c
arch/sparc64/kernel/signal.c
arch/sparc64/kernel/signal32.c