diff options
Diffstat (limited to 'arch/x86/kernel/signal.c')
-rw-r--r-- | arch/x86/kernel/signal.c | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/arch/x86/kernel/signal.c b/arch/x86/kernel/signal.c index dde3f2ae2371..d2cc6428c587 100644 --- a/arch/x86/kernel/signal.c +++ b/arch/x86/kernel/signal.c | |||
@@ -240,11 +240,10 @@ get_sigframe(struct k_sigaction *ka, struct pt_regs *regs, size_t frame_size, | |||
240 | 240 | ||
241 | if (used_math()) { | 241 | if (used_math()) { |
242 | sp -= sig_xstate_size; | 242 | sp -= sig_xstate_size; |
243 | #ifdef CONFIG_X86_32 | 243 | #ifdef CONFIG_X86_64 |
244 | *fpstate = (void __user *) sp; | 244 | sp = round_down(sp, 64); |
245 | #else /* !CONFIG_X86_32 */ | 245 | #endif /* CONFIG_X86_64 */ |
246 | *fpstate = (void __user *)round_down(sp, 64); | 246 | *fpstate = (void __user *)sp; |
247 | #endif /* CONFIG_X86_32 */ | ||
248 | 247 | ||
249 | if (save_i387_xstate(*fpstate) < 0) | 248 | if (save_i387_xstate(*fpstate) < 0) |
250 | return (void __user *)-1L; | 249 | return (void __user *)-1L; |