diff options
author | Jeff Dike <jdike@addtoit.com> | 2007-01-30 17:36:17 -0500 |
---|---|---|
committer | Linus Torvalds <torvalds@woody.linux-foundation.org> | 2007-01-30 19:01:35 -0500 |
commit | 3896625d0badd53dbc34d584861a36ba7eb4613f (patch) | |
tree | 35af106b8356634a0e804341b8eb0a90b588df41 /arch/um/sys-x86_64 | |
parent | 99abaf51e25f7d4ac2081e5cdc1f01baa0543514 (diff) |
[PATCH] uml: fix signal frame alignment
Use the same signal frame alignment calculations as the underlying
architecture. x86_64 appeared to do this, but the "- 8" was really
subtracting 8 * sizeof(struct rt_sigframe) rather than 8 bytes.
UML/i386 might have been OK, but I changed the calculation to match
i386 just to be sure.
Signed-off-by: Jeff Dike <jdike@addtoit.com>
Cc: <stable@kernel.org>
Cc: Adrian Bunk <bunk@stusta.de>
Cc: Paolo 'Blaisorblade' Giarrusso <blaisorblade@yahoo.it>
Acked-by: Antoine Martin <antoine@nagafix.co.uk>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'arch/um/sys-x86_64')
-rw-r--r-- | arch/um/sys-x86_64/signal.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/arch/um/sys-x86_64/signal.c b/arch/um/sys-x86_64/signal.c index 9edf114faf79..af2f017617b4 100644 --- a/arch/um/sys-x86_64/signal.c +++ b/arch/um/sys-x86_64/signal.c | |||
@@ -191,8 +191,9 @@ int setup_signal_stack_si(unsigned long stack_top, int sig, | |||
191 | struct task_struct *me = current; | 191 | struct task_struct *me = current; |
192 | 192 | ||
193 | frame = (struct rt_sigframe __user *) | 193 | frame = (struct rt_sigframe __user *) |
194 | round_down(stack_top - sizeof(struct rt_sigframe), 16) - 8; | 194 | round_down(stack_top - sizeof(struct rt_sigframe), 16); |
195 | frame = (struct rt_sigframe __user *) ((unsigned long) frame - 128); | 195 | /* Subtract 128 for a red zone and 8 for proper alignment */ |
196 | frame = (struct rt_sigframe __user *) ((unsigned long) frame - 128 - 8); | ||
196 | 197 | ||
197 | if (!access_ok(VERIFY_WRITE, fp, sizeof(struct _fpstate))) | 198 | if (!access_ok(VERIFY_WRITE, fp, sizeof(struct _fpstate))) |
198 | goto out; | 199 | goto out; |