svn commit: r194524 - head/sys/ia64/ia64

Marcel Moolenaar marcel at FreeBSD.org
Sat Jun 20 05:36:54 UTC 2009


Author: marcel
Date: Sat Jun 20 05:36:53 2009
New Revision: 194524
URL: http://svn.freebsd.org/changeset/base/194524

Log:
  Drop the high FP state of an exiting thread in cpu_thread_exit() and
  not in cpu_exit(). The latter is called after td_md.md_highfp_mtx
  has been destroyed, which results in a race condition when another
  thread wants to use the high FP registers on the CPU that still has
  the high FP registers in question.

Modified:
  head/sys/ia64/ia64/vm_machdep.c

Modified: head/sys/ia64/ia64/vm_machdep.c
==============================================================================
--- head/sys/ia64/ia64/vm_machdep.c	Sat Jun 20 00:54:57 2009	(r194523)
+++ head/sys/ia64/ia64/vm_machdep.c	Sat Jun 20 05:36:53 2009	(r194524)
@@ -99,6 +99,9 @@
 void
 cpu_thread_exit(struct thread *td)
 {
+
+	/* Throw away the high FP registers. */
+	ia64_highfp_drop(td);
 }
 
 void
@@ -319,10 +322,6 @@ cpu_set_fork_handler(td, func, arg)
 void
 cpu_exit(struct thread *td)
 {
-
-	/* XXX: Should this be in cpu_thread_exit() instead? */
-	/* Throw away the high FP registers. */
-	ia64_highfp_drop(td);
 }
 
 /*


More information about the svn-src-head mailing list