patch-2.1.109 linux/arch/i386/kernel/ptrace.c

Next file: linux/arch/i386/kernel/setup.c
Previous file: linux/arch/i386/kernel/process.c
Back to the patch index
Back to the overall index

diff -u --recursive --new-file v2.1.108/linux/arch/i386/kernel/ptrace.c linux/arch/i386/kernel/ptrace.c
@@ -624,14 +624,8 @@
 #ifdef CONFIG_MATH_EMULATION
 			if ( boot_cpu_data.hard_math ) {
 #endif
-			  if (last_task_used_math == child) {
-			    clts();
-			    __asm__("fnsave %0; fwait":"=m" (child->tss.i387.hard));
-			    last_task_used_math = NULL;
-			    stts();
-			  }
-			  __copy_to_user((void *)data, &child->tss.i387.hard,
-					 sizeof(struct user_i387_struct));
+				__copy_to_user((void *)data, &child->tss.i387.hard,
+						sizeof(struct user_i387_struct));
 #ifdef CONFIG_MATH_EMULATION
 			} else {
 			  save_i387_soft(&child->tss.i387.soft,
@@ -652,13 +646,10 @@
 #ifdef CONFIG_MATH_EMULATION
 			if ( boot_cpu_data.hard_math ) {
 #endif
-			  if (last_task_used_math == child) {
-			    /* Discard the state of the FPU */
-			    last_task_used_math = NULL;
-			  }
 			  __copy_from_user(&child->tss.i387.hard, (void *)data,
 					   sizeof(struct user_i387_struct));
 			  child->flags &= ~PF_USEDFPU;
+			  stts();
 #ifdef CONFIG_MATH_EMULATION
 			} else {
 			  restore_i387_soft(&child->tss.i387.soft,

FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen, slshen@lbl.gov