patch-2.4.22 linux-2.4.22/arch/i386/kernel/i387.c
Next file: linux-2.4.22/arch/i386/kernel/io_apic.c
Previous file: linux-2.4.22/arch/i386/kernel/dmi_scan.c
Back to the patch index
Back to the overall index
- Lines: 19
- Date:
2003-08-25 04:44:39.000000000 -0700
- Orig file:
linux-2.4.21/arch/i386/kernel/i387.c
- Orig date:
2002-08-02 17:39:42.000000000 -0700
diff -urN linux-2.4.21/arch/i386/kernel/i387.c linux-2.4.22/arch/i386/kernel/i387.c
@@ -373,14 +373,14 @@
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;
- return convert_fxsr_from_user( &tsk->thread.i387.fxsave, buf );
+ return err ? 1 : convert_fxsr_from_user( &tsk->thread.i387.fxsave, buf );
}
int restore_i387( struct _fpstate *buf )
FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen (who was at: slshen@lbl.gov)