Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 20 Jun 2009 05:36:53 +0000 (UTC)
From:      Marcel Moolenaar <marcel@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r194524 - head/sys/ia64/ia64
Message-ID:  <200906200536.n5K5arb0065685@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
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);
 }
 
 /*



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200906200536.n5K5arb0065685>