Commit f8fb99a0 authored by Anton Blanchard's avatar Anton Blanchard

ppc64: Be sure to zero the fpscr in a signal handler, otherwise

we take a SIGFPE as soon as the signal handler tries to do any FP.
parent 1bca8fec
......@@ -318,6 +318,7 @@ setup_rt_frame(struct pt_regs *regs, struct sigregs *frame,
goto badframe;
flush_icache_range((unsigned long) &frame->tramp[0],
(unsigned long) &frame->tramp[2]);
current->thread.fpscr = 0; /* turn off all fp exceptions */
/* Retrieve rt_sigframe from stack and
set up registers for signal handler
......@@ -435,6 +436,7 @@ setup_frame(struct pt_regs *regs, struct sigregs *frame,
goto badframe;
flush_icache_range((unsigned long) &frame->tramp[0],
(unsigned long) &frame->tramp[2]);
current->thread.fpscr = 0; /* turn off all fp exceptions */
newsp -= __SIGNAL_FRAMESIZE;
if ( get_user(temp_ptr, &sc->handler))
......
......@@ -448,6 +448,7 @@ setup_frame32(struct pt_regs *regs, struct sigregs32 *frame,
flush_icache_range((unsigned long) &frame->tramp[0],
(unsigned long) &frame->tramp[2]);
current->thread.fpscr = 0; /* turn off all fp exceptions */
newsp -= __SIGNAL_FRAMESIZE32;
if (put_user(regs->gpr[1], (u32*)(u64)newsp)
......@@ -1063,6 +1064,7 @@ setup_rt_frame32(struct pt_regs *regs, struct sigregs32 *frame,
flush_icache_range((unsigned long) &frame->tramp[0],
(unsigned long) &frame->tramp[2]);
current->thread.fpscr = 0; /* turn off all fp exceptions */
/* Retrieve rt_sigframe from stack and
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment