diff options
author | marcel <marcel@FreeBSD.org> | 2009-06-20 05:36:53 +0000 |
---|---|---|
committer | marcel <marcel@FreeBSD.org> | 2009-06-20 05:36:53 +0000 |
commit | 1c7681de495de3c57caec43f08bcbee01d195ee3 (patch) | |
tree | a38d6d97463d26685c13245fb841421582c98e66 /sys | |
parent | 40e33db11b25c0e3d473f8f8fbfaa1fbc6c30a8f (diff) | |
download | FreeBSD-src-1c7681de495de3c57caec43f08bcbee01d195ee3.zip FreeBSD-src-1c7681de495de3c57caec43f08bcbee01d195ee3.tar.gz |
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.
Diffstat (limited to 'sys')
-rw-r--r-- | sys/ia64/ia64/vm_machdep.c | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/sys/ia64/ia64/vm_machdep.c b/sys/ia64/ia64/vm_machdep.c index 42a1796..4259875 100644 --- a/sys/ia64/ia64/vm_machdep.c +++ b/sys/ia64/ia64/vm_machdep.c @@ -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); } /* |