summaryrefslogtreecommitdiffstats
path: root/arch/x86/kernel/signal_64.c
diff options
context:
space:
mode:
authorIngo Molnar <mingo@elte.hu>2008-09-05 17:53:05 +0200
committerIngo Molnar <mingo@elte.hu>2008-09-05 17:53:05 +0200
commit28c3cfd5fb998bd3683bebeebbba38baa2101cad (patch)
tree3d325023e6dc56baa6c69fc59dd55bf37ef7967e /arch/x86/kernel/signal_64.c
parent04197c83b3e05546d1003cfa3ff43f1639c0057f (diff)
parentb380b0d4f7dffcc235c0facefa537d4655619101 (diff)
downloadblackbird-op-linux-28c3cfd5fb998bd3683bebeebbba38baa2101cad.tar.gz
blackbird-op-linux-28c3cfd5fb998bd3683bebeebbba38baa2101cad.zip
Merge branch 'linus' into x86/tracehook
Diffstat (limited to 'arch/x86/kernel/signal_64.c')
-rw-r--r--arch/x86/kernel/signal_64.c11
1 files changed, 10 insertions, 1 deletions
diff --git a/arch/x86/kernel/signal_64.c b/arch/x86/kernel/signal_64.c
index d01e3f6ef26d..1e1933892b4f 100644
--- a/arch/x86/kernel/signal_64.c
+++ b/arch/x86/kernel/signal_64.c
@@ -106,7 +106,16 @@ static inline int restore_i387(struct _fpstate __user *buf)
clts();
task_thread_info(current)->status |= TS_USEDFPU;
}
- return restore_fpu_checking((__force struct i387_fxsave_struct *)buf);
+ err = restore_fpu_checking((__force struct i387_fxsave_struct *)buf);
+ if (unlikely(err)) {
+ /*
+ * Encountered an error while doing the restore from the
+ * user buffer, clear the fpu state.
+ */
+ clear_fpu(tsk);
+ clear_used_math();
+ }
+ return err;
}
/*
OpenPOWER on IntegriCloud