Skip to content

Commit

Permalink
microblaze: Raise SIGFPE/FPE_INTDIV for div by zero
Browse files Browse the repository at this point in the history
It fixes the signal nr raised for divizion by zero from
SIGILL to SIGFPE, in accordance to POSIX and other archs.

This came up due to a failed test in the GCC testsuite.

Signed-off-by: Edgar E. Iglesias <edgar.iglesias@gmail.com>
  • Loading branch information
Edgar E. Iglesias authored and Michal Simek committed Oct 14, 2011
1 parent 69515f8 commit 15ec090
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion arch/microblaze/kernel/exceptions.c
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,7 @@ asmlinkage void full_exception(struct pt_regs *regs, unsigned int type,
case MICROBLAZE_DIV_ZERO_EXCEPTION:
if (user_mode(regs)) {
pr_debug("Divide by zero exception in user mode\n");
_exception(SIGILL, regs, FPE_INTDIV, addr);
_exception(SIGFPE, regs, FPE_INTDIV, addr);
return;
}
printk(KERN_WARNING "Divide by zero exception " \
Expand Down

0 comments on commit 15ec090

Please sign in to comment.