|
@@ -91,14 +91,6 @@ int save_i387_xstate(void __user *buf)
|
|
return 0;
|
|
return 0;
|
|
|
|
|
|
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
|
|
|
|
- * clean context for the bytes not touched by the fxsave/xsave.
|
|
|
|
- */
|
|
|
|
- err = __clear_user(buf, sig_xstate_size);
|
|
|
|
- if (err)
|
|
|
|
- return err;
|
|
|
|
-
|
|
|
|
if (use_xsave())
|
|
if (use_xsave())
|
|
err = xsave_user(buf);
|
|
err = xsave_user(buf);
|
|
else
|
|
else
|
|
@@ -184,8 +176,8 @@ static int restore_user_xstate(void __user *buf)
|
|
* init the state skipped by the user.
|
|
* init the state skipped by the user.
|
|
*/
|
|
*/
|
|
mask = pcntxt_mask & ~mask;
|
|
mask = pcntxt_mask & ~mask;
|
|
-
|
|
|
|
- xrstor_state(init_xstate_buf, mask);
|
|
|
|
|
|
+ if (unlikely(mask))
|
|
|
|
+ xrstor_state(init_xstate_buf, mask);
|
|
|
|
|
|
return 0;
|
|
return 0;
|
|
|
|
|