[MIPS] Generate SIGILL again
authorDaniel Jacobowitz <dan@debian.org>
Sun, 27 Nov 2005 03:34:41 +0000 (22:34 -0500)
committerRalf Baechle <ralf@linux-mips.org>
Thu, 1 Dec 2005 11:05:14 +0000 (11:05 +0000)
The rdhwr emulation accidentally swallowed the SIGILL from most other
illegal instructions.  Make sure to return -EFAULT by default.

Signed-off-by: Daniel Jacobowitz <dan@codesourcery.com>
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
arch/mips/kernel/traps.c

index 6f3ff96906864e29244670df11a05e509820bd91..7058893d5ad2227259746895558f47644e6d66bd 100644 (file)
@@ -534,13 +534,14 @@ static inline int simulate_rdhwr(struct pt_regs *regs)
                switch (rd) {
                        case 29:
                                regs->regs[rt] = ti->tp_value;
-                               break;
+                               return 0;
                        default:
                                return -EFAULT;
                }
        }
 
-       return 0;
+       /* Not ours.  */
+       return -EFAULT;
 }
 
 asmlinkage void do_ov(struct pt_regs *regs)