Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 113561
b: refs/heads/master
c: 091d30c
h: refs/heads/master
i:
  113559: fc8fa02
v: v3
  • Loading branch information
Alexander van Heukelum authored and Ingo Molnar committed Oct 13, 2008
1 parent b863d63 commit 023cd3f
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 8 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: 699d2937d45d9dabc1772d0d07501ccc43885c23
refs/heads/master: 091d30c8f7744f43b0bb507fd30ceb95f9ff9e1b
15 changes: 8 additions & 7 deletions trunk/arch/x86/kernel/traps_64.c
Original file line number Diff line number Diff line change
Expand Up @@ -604,14 +604,15 @@ asmlinkage void __attribute__((weak)) mce_threshold_interrupt(void)
*/
asmlinkage void math_state_restore(void)
{
struct task_struct *me = current;
struct thread_info *thread = current_thread_info();
struct task_struct *tsk = thread->task;

if (!used_math()) {
if (!tsk_used_math(tsk)) {
local_irq_enable();
/*
* does a slab alloc which can sleep
*/
if (init_fpu(me)) {
if (init_fpu(tsk)) {
/*
* ran out of memory!
*/
Expand All @@ -625,13 +626,13 @@ asmlinkage void math_state_restore(void)
/*
* Paranoid restore. send a SIGSEGV if we fail to restore the state.
*/
if (unlikely(restore_fpu_checking(me))) {
if (unlikely(restore_fpu_checking(tsk))) {
stts();
force_sig(SIGSEGV, me);
force_sig(SIGSEGV, tsk);
return;
}
task_thread_info(me)->status |= TS_USEDFPU;
me->fpu_counter++;
thread->status |= TS_USEDFPU; /* So we fnsave on switch_to() */
tsk->fpu_counter++;
}
EXPORT_SYMBOL_GPL(math_state_restore);

Expand Down

0 comments on commit 023cd3f

Please sign in to comment.