Skip to content

Commit

Permalink
[IA64] restore_sigcontext is not preempt safe
Browse files Browse the repository at this point in the history
restore_sigcontext calls ia64_set_local_fpu_owner() which requires that
preempt be disabled.

Signed-off-by: Keith Owens <kaos@sgi.com>
Signed-off-by: Tony Luck <tony.luck@intel.com>
  • Loading branch information
Keith Owens authored and Tony Luck committed Jul 6, 2005
1 parent 7fe4c1b commit 2ba3e3e
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions arch/ia64/kernel/signal.c
Original file line number Diff line number Diff line change
Expand Up @@ -143,13 +143,15 @@ restore_sigcontext (struct sigcontext __user *sc, struct sigscratch *scr)

__copy_from_user(current->thread.fph, &sc->sc_fr[32], 96*16);
psr->mfh = 0; /* drop signal handler's fph contents... */
preempt_disable();
if (psr->dfh)
ia64_drop_fpu(current);
else {
/* We already own the local fph, otherwise psr->dfh wouldn't be 0. */
__ia64_load_fpu(current->thread.fph);
ia64_set_local_fpu_owner(current);
}
preempt_enable();
}
return err;
}
Expand Down

0 comments on commit 2ba3e3e

Please sign in to comment.