summaryrefslogtreecommitdiffstats
path: root/arch/x86/kernel/xsave.c
diff options
context:
space:
mode:
authorIngo Molnar <mingo@kernel.org>2015-03-23 11:13:15 +0100
committerIngo Molnar <mingo@kernel.org>2015-03-23 11:13:15 +0100
commite4518ab90f63cd5bea3ddc15341162debc34442b (patch)
treefcefaeced9562de840bbf11ec2ffc95e1d9a571f /arch/x86/kernel/xsave.c
parentc56716af8d27ca8dd6e45445ae1c0a05fd9753a6 (diff)
parentbc465aa9d045feb0e13b4a8f32cc33c1943f62d6 (diff)
downloadtalos-op-linux-e4518ab90f63cd5bea3ddc15341162debc34442b.tar.gz
talos-op-linux-e4518ab90f63cd5bea3ddc15341162debc34442b.zip
Merge tag 'v4.0-rc5' into x86/asm, to resolve conflicts
Conflicts: arch/x86/kernel/entry_64.S Signed-off-by: Ingo Molnar <mingo@kernel.org>
Diffstat (limited to 'arch/x86/kernel/xsave.c')
-rw-r--r--arch/x86/kernel/xsave.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/arch/x86/kernel/xsave.c b/arch/x86/kernel/xsave.c
index 34f66e58a896..cdc6cf903078 100644
--- a/arch/x86/kernel/xsave.c
+++ b/arch/x86/kernel/xsave.c
@@ -379,7 +379,7 @@ int __restore_xstate_sig(void __user *buf, void __user *buf_fx, int size)
* thread's fpu state, reconstruct fxstate from the fsave
* header. Sanitize the copied state etc.
*/
- struct xsave_struct *xsave = &tsk->thread.fpu.state->xsave;
+ struct fpu *fpu = &tsk->thread.fpu;
struct user_i387_ia32_struct env;
int err = 0;
@@ -393,14 +393,15 @@ int __restore_xstate_sig(void __user *buf, void __user *buf_fx, int size)
*/
drop_fpu(tsk);
- if (__copy_from_user(xsave, buf_fx, state_size) ||
+ if (__copy_from_user(&fpu->state->xsave, buf_fx, state_size) ||
__copy_from_user(&env, buf, sizeof(env))) {
+ fpu_finit(fpu);
err = -1;
} else {
sanitize_restored_xstate(tsk, &env, xstate_bv, fx_only);
- set_used_math();
}
+ set_used_math();
if (use_eager_fpu()) {
preempt_disable();
math_state_restore();
OpenPOWER on IntegriCloud