]> pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - arch/i386/kernel/signal.c
Merge master.kernel.org:/home/rmk/linux-2.6-serial
[linux-2.6-omap-h63xx.git] / arch / i386 / kernel / signal.c
index 61eb0c8a6e47dc9763c8f78d85f3aa3e7be40456..adcd069db91e8cae96ec53eeb2861f9c9e8c4b92 100644 (file)
@@ -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.