Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 73487
b: refs/heads/master
c: 92d140e
h: refs/heads/master
i:
  73485: 2627bee
  73483: a912461
  73479: e18be0f
  73471: bc90049
v: v3
  • Loading branch information
Siddha, Suresh B authored and Linus Torvalds committed Nov 12, 2007
1 parent 12947b5 commit f7dd401
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 5 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: efe44183f6bab5b8acb6a6182d95274978c8abb1
refs/heads/master: 92d140e21f1ce8cf99320afbbcad73879128e6dc
9 changes: 5 additions & 4 deletions trunk/arch/x86/kernel/i387_64.c
Original file line number Diff line number Diff line change
Expand Up @@ -92,13 +92,14 @@ int save_i387(struct _fpstate __user *buf)
if (task_thread_info(tsk)->status & TS_USEDFPU) {
err = save_i387_checking((struct i387_fxsave_struct __user *)buf);
if (err) return err;
task_thread_info(tsk)->status &= ~TS_USEDFPU;
stts();
} else {
if (__copy_to_user(buf, &tsk->thread.i387.fxsave,
} else {
if (__copy_to_user(buf, &tsk->thread.i387.fxsave,
sizeof(struct i387_fxsave_struct)))
return -1;
}
return 1;
}
return 1;
}

/*
Expand Down
5 changes: 5 additions & 0 deletions trunk/include/asm-x86/i387_64.h
Original file line number Diff line number Diff line change
Expand Up @@ -203,6 +203,11 @@ static inline void save_init_fpu(struct task_struct *tsk)
*/
static inline int restore_i387(struct _fpstate __user *buf)
{
set_used_math();
if (!(task_thread_info(current)->status & TS_USEDFPU)) {
clts();
task_thread_info(current)->status |= TS_USEDFPU;
}
return restore_fpu_checking((__force struct i387_fxsave_struct *)buf);
}

Expand Down

0 comments on commit f7dd401

Please sign in to comment.