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

[ Available lists | Index of svn-src-head | Month of Jun 2009 | Week of 20 Jun 2009 | Raw email | View thread | Wrap long lines | Reply | Tag ]
From
Marcel Moolenaar <marcel@FreeBSD.org>
Date
20 Jun 2009 05:36:54
Subject
svn commit: r194524 - head/sys/ia64/ia64
Message-ID
200906200536.n5K5arb0065685@svn.freebsd.org


[ Hide this part ]
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);
}

/*


Elapsed time: 0.090 seconds