diff options
author | Hiroshi Shimamoto <h-shimamoto@ct.jp.nec.com> | 2008-11-05 21:30:25 -0500 |
---|---|---|
committer | Ingo Molnar <mingo@elte.hu> | 2008-11-06 02:01:59 -0500 |
commit | 4b33669e817a01dd99ff91df330d504ccfb2e99c (patch) | |
tree | 1c03ba9d6a66b1f1d4f724f01ab7aa3824a94d9c /arch/x86/kernel/signal_32.c | |
parent | 124ffe1456d6efea5b32cc6d36e3fa434cdc84d9 (diff) |
x86: signal_32: do save_i387_xstate() at get_sigframe()
Impact: cleanup
move calling save_i387_xstate() into get_sigframe() from setup_sigcontext()
like 64bit.
Signed-off-by: Hiroshi Shimamoto <h-shimamoto@ct.jp.nec.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Diffstat (limited to 'arch/x86/kernel/signal_32.c')
-rw-r--r-- | arch/x86/kernel/signal_32.c | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/arch/x86/kernel/signal_32.c b/arch/x86/kernel/signal_32.c index a0efc1b3c4c9..6a05c74b4084 100644 --- a/arch/x86/kernel/signal_32.c +++ b/arch/x86/kernel/signal_32.c | |||
@@ -303,11 +303,7 @@ setup_sigcontext(struct sigcontext __user *sc, void __user *fpstate, | |||
303 | err |= __put_user(regs->sp, &sc->sp_at_signal); | 303 | err |= __put_user(regs->sp, &sc->sp_at_signal); |
304 | err |= __put_user(regs->ss, (unsigned int __user *)&sc->ss); | 304 | err |= __put_user(regs->ss, (unsigned int __user *)&sc->ss); |
305 | 305 | ||
306 | tmp = save_i387_xstate(fpstate); | 306 | err |= __put_user(fpstate, &sc->fpstate); |
307 | if (tmp < 0) | ||
308 | err = 1; | ||
309 | else | ||
310 | err |= __put_user(tmp ? fpstate : NULL, &sc->fpstate); | ||
311 | 307 | ||
312 | /* non-iBCS2 extensions.. */ | 308 | /* non-iBCS2 extensions.. */ |
313 | err |= __put_user(mask, &sc->oldmask); | 309 | err |= __put_user(mask, &sc->oldmask); |
@@ -350,6 +346,8 @@ get_sigframe(struct k_sigaction *ka, struct pt_regs *regs, size_t frame_size, | |||
350 | if (used_math()) { | 346 | if (used_math()) { |
351 | sp = sp - sig_xstate_size; | 347 | sp = sp - sig_xstate_size; |
352 | *fpstate = (struct _fpstate *) sp; | 348 | *fpstate = (struct _fpstate *) sp; |
349 | if (save_i387_xstate(*fpstate) < 0) | ||
350 | return (void __user *)-1L; | ||
353 | } | 351 | } |
354 | 352 | ||
355 | sp -= frame_size; | 353 | sp -= frame_size; |