|
@@ -89,7 +89,7 @@ int save_i387_xstate(void __user *buf)
|
|
|
|
|
|
if (!used_math())
|
|
if (!used_math())
|
|
return 0;
|
|
return 0;
|
|
- clear_used_math(); /* trigger finit */
|
|
|
|
|
|
+
|
|
if (task_thread_info(tsk)->status & TS_USEDFPU) {
|
|
if (task_thread_info(tsk)->status & TS_USEDFPU) {
|
|
/*
|
|
/*
|
|
* Start with clearing the user buffer. This will present a
|
|
* Start with clearing the user buffer. This will present a
|
|
@@ -114,6 +114,8 @@ int save_i387_xstate(void __user *buf)
|
|
return -1;
|
|
return -1;
|
|
}
|
|
}
|
|
|
|
|
|
|
|
+ clear_used_math(); /* trigger finit */
|
|
|
|
+
|
|
if (task_thread_info(tsk)->status & TS_XSAVE) {
|
|
if (task_thread_info(tsk)->status & TS_XSAVE) {
|
|
struct _fpstate __user *fx = buf;
|
|
struct _fpstate __user *fx = buf;
|
|
struct _xstate __user *x = buf;
|
|
struct _xstate __user *x = buf;
|