diff options
author | David S. Miller <davem@davemloft.net> | 2010-02-09 19:18:40 -0500 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2010-02-09 19:18:40 -0500 |
commit | f036d9f3985a529a81e582f68aa984eb7b20d54d (patch) | |
tree | eaf58cc5d2c81e3ca08e23b5cda76eacd515d166 /arch/sparc/kernel/signal_32.c | |
parent | 6abce7711fcbd72b42f0c9632c1beccf4e674663 (diff) |
sparc: Align clone and signal stacks to 16 bytes.
This is mandatory for 64-bit processes, and doing it also for 32-bit
processes saves a conditional in the compat case.
This fixes the glibc/nptl/tst-stdio1 test case, as well
as many others, on 64-bit.
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'arch/sparc/kernel/signal_32.c')
-rw-r--r-- | arch/sparc/kernel/signal_32.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/arch/sparc/kernel/signal_32.c b/arch/sparc/kernel/signal_32.c index 7ce1a1005b1d..9882df92ba0a 100644 --- a/arch/sparc/kernel/signal_32.c +++ b/arch/sparc/kernel/signal_32.c | |||
@@ -267,15 +267,17 @@ static inline void __user *get_sigframe(struct sigaction *sa, struct pt_regs *re | |||
267 | sp = current->sas_ss_sp + current->sas_ss_size; | 267 | sp = current->sas_ss_sp + current->sas_ss_size; |
268 | } | 268 | } |
269 | 269 | ||
270 | sp -= framesize; | ||
271 | |||
270 | /* Always align the stack frame. This handles two cases. First, | 272 | /* Always align the stack frame. This handles two cases. First, |
271 | * sigaltstack need not be mindful of platform specific stack | 273 | * sigaltstack need not be mindful of platform specific stack |
272 | * alignment. Second, if we took this signal because the stack | 274 | * alignment. Second, if we took this signal because the stack |
273 | * is not aligned properly, we'd like to take the signal cleanly | 275 | * is not aligned properly, we'd like to take the signal cleanly |
274 | * and report that. | 276 | * and report that. |
275 | */ | 277 | */ |
276 | sp &= ~7UL; | 278 | sp &= ~15UL; |
277 | 279 | ||
278 | return (void __user *)(sp - framesize); | 280 | return (void __user *) sp; |
279 | } | 281 | } |
280 | 282 | ||
281 | static inline int | 283 | static inline int |