1 # (from RH - fixes CAN-2003-0248)
2 --- linux-2.4.20/arch/i386/kernel/i387.c~ 2003-05-27 14:10:53.000000000 +0200
3 +++ linux-2.4.20/arch/i386/kernel/i387.c 2003-05-27 14:10:53.000000000 +0200
5 static int restore_i387_fxsave( struct _fpstate *buf )
7 struct task_struct *tsk = current;
10 - if ( __copy_from_user( &tsk->thread.i387.fxsave, &buf->_fxsr_env[0],
11 + err = __copy_from_user( &tsk->thread.i387.fxsave, &buf->_fxsr_env[0],
12 - sizeof(struct i387_fxsave_struct) ) )
13 + sizeof(struct i387_fxsave_struct) ) ;
15 /* mxcsr bit 6 and 31-16 must be zero for security reasons */
16 tsk->thread.i387.fxsave.mxcsr &= 0xffbf;
19 return convert_fxsr_from_user( &tsk->thread.i387.fxsave, buf );