lkml.org 
[lkml]   [2018]   [Dec]   [10]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH 29/29] x86/fpu: Defer FPU state load until return to userspace
On 2018-11-28 23:20:35 [+0100], To linux-kernel@vger.kernel.org wrote:
> --- a/arch/x86/kernel/fpu/signal.c
> +++ b/arch/x86/kernel/fpu/signal.c
> @@ -228,13 +228,12 @@ static int __fpu__restore_sig(void __user *buf, void __user *buf_fx, int size)
> struct task_struct *tsk = current;
> struct fpu *fpu = &tsk->thread.fpu;
> int state_size = fpu_kernel_xstate_size;
> - union fpregs_state *state;
> - void *tmp;
> struct user_i387_ia32_struct env;
> struct user_i387_ia32_struct *envp = NULL;
> int ret = 0;
> u64 xfeatures = 0;
> int fx_only = 0;
> + int err;
>

> } else if (use_fxsr()) {
> - ret = __copy_from_user(&state->fxsave, buf_fx, state_size);
> - if (ret)
> + ret = __copy_from_user(&fpu->state.fxsave, buf_fx, state_size);
> + if (ret) {
> + err = -EFAULT;
> goto err_out;
> + }

After reworking the series after addressing the comments for 08/29 I
noticed that `err' should have been `ret'.

Sebastian

\
 
 \ /
  Last update: 2018-12-10 15:42    [W:0.465 / U:0.212 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site