]> git.karo-electronics.de Git - karo-tx-linux.git/commitdiff
parisc: clear floating point exception flag on SIGFPE signal
authorHelge Deller <deller@gmx.de>
Mon, 3 May 2010 20:44:21 +0000 (20:44 +0000)
committerGreg Kroah-Hartman <gregkh@suse.de>
Mon, 5 Jul 2010 18:11:20 +0000 (11:11 -0700)
commit 550f0d922286556c7ea43974bb7921effb5a5278 upstream.

Clear the floating point exception flag before returning to
user space. This is needed, else the libc trampoline handler
may hit the same SIGFPE again while building up a trampoline
to a signal handler.

Fixes debian bug #559406.

Signed-off-by: Helge Deller <deller@gmx.de>
Signed-off-by: Kyle McMartin <kyle@mcmartin.ca>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
arch/parisc/math-emu/decode_exc.c

index 3ca1c61492182d3321c2fe7d2cf00d003ff5a8a5..27a7492ddb0d66f7762e94dea40ff3f3ac1fcd85 100644 (file)
@@ -342,6 +342,7 @@ decode_fpu(unsigned int Fpu_register[], unsigned int trap_counts[])
                return SIGNALCODE(SIGFPE, FPE_FLTINV);
          case DIVISIONBYZEROEXCEPTION:
                update_trap_counts(Fpu_register, aflags, bflags, trap_counts);
+               Clear_excp_register(exception_index);
                return SIGNALCODE(SIGFPE, FPE_FLTDIV);
          case INEXACTEXCEPTION:
                update_trap_counts(Fpu_register, aflags, bflags, trap_counts);