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.
This commit is contained in:
parent
40e33db11b
commit
1c7681de49
@ -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);
|
||||
}
|
||||
|
||||
/*
|
||||
|
Loading…
Reference in New Issue
Block a user