Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 323995
b: refs/heads/master
c: e962591
h: refs/heads/master
i:
  323993: d1355ee
  323991: a1a6278
v: v3
  • Loading branch information
Suresh Siddha authored and H. Peter Anvin committed Sep 18, 2012
1 parent de864b7 commit 1aab341
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 12 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 72a671ced66db6d1c2bfff1c930a101ac8d08204
refs/heads/master: e962591749dfd4df9fea2c530ed7a3cfed50e5aa
7 changes: 1 addition & 6 deletions trunk/arch/x86/include/asm/fpu-internal.h
Original file line number Diff line number Diff line change
Expand Up @@ -448,17 +448,12 @@ static inline void save_init_fpu(struct task_struct *tsk)
preempt_enable();
}

static inline void stop_fpu_preload(struct task_struct *tsk)
{
tsk->fpu_counter = 0;
}

static inline void drop_fpu(struct task_struct *tsk)
{
/*
* Forget coprocessor state..
*/
stop_fpu_preload(tsk);
tsk->fpu_counter = 0;
preempt_disable();
__drop_fpu(tsk);
preempt_enable();
Expand Down
8 changes: 3 additions & 5 deletions trunk/arch/x86/kernel/xsave.c
Original file line number Diff line number Diff line change
Expand Up @@ -382,16 +382,14 @@ int __restore_xstate_sig(void __user *buf, void __user *buf_fx, int size)
struct xsave_struct *xsave = &tsk->thread.fpu.state->xsave;
struct user_i387_ia32_struct env;

stop_fpu_preload(tsk);
unlazy_fpu(tsk);
drop_fpu(tsk);

if (__copy_from_user(xsave, buf_fx, state_size) ||
__copy_from_user(&env, buf, sizeof(env))) {
drop_fpu(tsk);
__copy_from_user(&env, buf, sizeof(env)))
return -1;
}

sanitize_restored_xstate(tsk, &env, xstate_bv, fx_only);
set_used_math();
} else {
/*
* For 64-bit frames and 32-bit fsave frames, restore the user
Expand Down

0 comments on commit 1aab341

Please sign in to comment.