RE: Fix floating-point preemption problem

From: Luck, Tony <>
Date: 2005-06-09 02:13:29
>	The only places where the FPU state is touched are in ptrace,  
>in switch_to(), and where handling a floating-point exception. In
>switch_to() preemption is off.  So it's only in trap.c and ptrace.c
>that we need to prevent preemption.

What about restore_sigcontext()?  It looks like we touch FPU state there
too, and it further appears that preemption is enabled.  Don't you
also need (Caution: Outlook may line-wrap this patch):

arch/ia64/kernel/signal.c: needs update
Index: arch/ia64/kernel/signal.c
--- 49f908df283332371b74c4686dd2f0109db2bc61/arch/ia64/kernel/signal.c  (mode:100644)
+++ uncommitted/arch/ia64/kernel/signal.c  (mode:100644)
@@ -141,6 +141,7 @@
 		struct ia64_psr *psr = ia64_psr(&scr->pt);
 		__copy_from_user(current->thread.fph, &sc->sc_fr[32], 96*16);
+		preempt_disable();
 		psr->mfh = 0;	/* drop signal handler's fph contents... */
 		if (psr->dfh)
@@ -149,6 +150,7 @@
+		preempt_enable();
 	return err;

To unsubscribe from this list: send the line "unsubscribe linux-ia64" in
the body of a message to
More majordomo info at
Received on Wed Jun 8 12:23:58 2005

This archive was generated by hypermail 2.1.8 : 2005-08-02 09:20:39 EST