--- 2.4.19pre6aa2/arch/i386/kernel/i387.c.~1~ Sun Apr 1 01:17:07 2001 +++ 2.4.19pre6aa2/arch/i386/kernel/i387.c Mon Apr 15 01:21:58 2002 @@ -349,13 +349,15 @@ static inline int restore_i387_fxsave( struct _fpstate *buf ) { + int err; struct task_struct *tsk = current; clear_fpu( tsk ); - if ( __copy_from_user( &tsk->thread.i387.fxsave, &buf->_fxsr_env[0], - sizeof(struct i387_fxsave_struct) ) ) - return 1; + err = __copy_from_user(&tsk->thread.i387.fxsave, &buf->_fxsr_env[0], + sizeof(struct i387_fxsave_struct)); /* mxcsr bit 6 and 31-16 must be zero for security reasons */ tsk->thread.i387.fxsave.mxcsr &= 0xffbf; + if (err) + return 1; return convert_fxsr_from_user( &tsk->thread.i387.fxsave, buf ); }