diff options
| author | Jeff Garzik <jgarzik@pobox.com> | 2005-10-18 21:23:11 -0400 |
|---|---|---|
| committer | Jeff Garzik <jgarzik@pobox.com> | 2005-10-18 21:23:11 -0400 |
| commit | 4e0e329d9a2011f9f7a7c0a378dc3bff7b0a0283 (patch) | |
| tree | a802614e01460631c694dfa118642d54c3d5fc79 /arch/i386/kernel/signal.c | |
| parent | e33b9dfa3008fcaa908dc0c8c472a812c400f839 (diff) | |
| parent | 59a10b172fccaea793352c00fd9065f0a5b4ef70 (diff) | |
| download | linux-4e0e329d9a2011f9f7a7c0a378dc3bff7b0a0283.tar.gz linux-4e0e329d9a2011f9f7a7c0a378dc3bff7b0a0283.tar.bz2 linux-4e0e329d9a2011f9f7a7c0a378dc3bff7b0a0283.zip | |
Merge branch 'upstream'
Diffstat (limited to 'arch/i386/kernel/signal.c')
| -rw-r--r-- | arch/i386/kernel/signal.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/arch/i386/kernel/signal.c b/arch/i386/kernel/signal.c index 61eb0c8a6e47..adcd069db91e 100644 --- a/arch/i386/kernel/signal.c +++ b/arch/i386/kernel/signal.c @@ -338,7 +338,11 @@ get_sigframe(struct k_sigaction *ka, struct pt_regs * regs, size_t frame_size) esp = (unsigned long) ka->sa.sa_restorer; } - return (void __user *)((esp - frame_size) & -8ul); + esp -= frame_size; + /* Align the stack pointer according to the i386 ABI, + * i.e. so that on function entry ((sp + 4) & 15) == 0. */ + esp = ((esp + 4) & -16ul) - 4; + return (void __user *) esp; } /* These symbols are defined with the addresses in the vsyscall page. |
