aboutsummaryrefslogtreecommitdiffstats
path: root/arch/x86/kernel/xsave.c
diff options
context:
space:
mode:
Diffstat (limited to 'arch/x86/kernel/xsave.c')
-rw-r--r--arch/x86/kernel/xsave.c12
1 files changed, 2 insertions, 10 deletions
diff --git a/arch/x86/kernel/xsave.c b/arch/x86/kernel/xsave.c
index 980149867a19..a4ae302f03aa 100644
--- a/arch/x86/kernel/xsave.c
+++ b/arch/x86/kernel/xsave.c
@@ -92,14 +92,6 @@ int save_i387_xstate(void __user *buf)
92 return 0; 92 return 0;
93 93
94 if (task_thread_info(tsk)->status & TS_USEDFPU) { 94 if (task_thread_info(tsk)->status & TS_USEDFPU) {
95 /*
96 * Start with clearing the user buffer. This will present a
97 * clean context for the bytes not touched by the fxsave/xsave.
98 */
99 err = __clear_user(buf, sig_xstate_size);
100 if (err)
101 return err;
102
103 if (use_xsave()) 95 if (use_xsave())
104 err = xsave_user(buf); 96 err = xsave_user(buf);
105 else 97 else
@@ -185,8 +177,8 @@ static int restore_user_xstate(void __user *buf)
185 * init the state skipped by the user. 177 * init the state skipped by the user.
186 */ 178 */
187 mask = pcntxt_mask & ~mask; 179 mask = pcntxt_mask & ~mask;
188 180 if (unlikely(mask))
189 xrstor_state(init_xstate_buf, mask); 181 xrstor_state(init_xstate_buf, mask);
190 182
191 return 0; 183 return 0;
192 184