summaryrefslogtreecommitdiffstats
path: root/arch
diff options
context:
space:
mode:
authorEric W. Biederman <ebiederm@xmission.com>2017-08-08 13:52:28 -0500
committerEric W. Biederman <ebiederm@xmission.com>2017-08-17 17:31:27 -0500
commit20229305afdc0e49b3af2204ab848d6bddcb9fc3 (patch)
tree23414a4c94b65dd04740e4bf39dd16b593223162 /arch
parentcc731525f26af85a1c3537da41e0abd1d35e0bdb (diff)
downloadop-kernel-dev-20229305afdc0e49b3af2204ab848d6bddcb9fc3.zip
op-kernel-dev-20229305afdc0e49b3af2204ab848d6bddcb9fc3.tar.gz
mips/signal: In force_fcr31_sig return in the impossible case
In a recent discussion Maciej Rozycki reported that this case is impossible. Handle the impossible case by just returning instead of trying to handle it. This makes static analysis simpler as it means nothing needs to consider the impossible case after the return statement. As the code no longer has to deal with this case remove FPE_FIXME from the mips siginfo.h Cc: "Maciej W. Rozycki" <macro@imgtec.com> Cc: Ralf Baechle <ralf@linux-mips.org> Link: http://lkml.kernel.org/r/20170718140651.15973-4-ebiederm@xmission.com Ref: ea1b75cf9138 ("signal/mips: Document a conflict with SI_USER with SIGFPE") Signed-off-by: "Eric W. Biederman" <ebiederm@xmission.com>
Diffstat (limited to 'arch')
-rw-r--r--arch/mips/include/uapi/asm/siginfo.h7
-rw-r--r--arch/mips/kernel/traps.c2
2 files changed, 1 insertions, 8 deletions
diff --git a/arch/mips/include/uapi/asm/siginfo.h b/arch/mips/include/uapi/asm/siginfo.h
index 22a86d8..cf6113b 100644
--- a/arch/mips/include/uapi/asm/siginfo.h
+++ b/arch/mips/include/uapi/asm/siginfo.h
@@ -123,11 +123,4 @@ typedef struct siginfo {
#define SI_TIMER -3 /* sent by timer expiration */
#define SI_MESGQ -4 /* sent by real time mesq state change */
-/*
- * SIGFPE si_codes
- */
-#ifdef __KERNEL__
-#define FPE_FIXME 0 /* Broken dup of SI_USER */
-#endif /* __KERNEL__ */
-
#endif /* _UAPI_ASM_SIGINFO_H */
diff --git a/arch/mips/kernel/traps.c b/arch/mips/kernel/traps.c
index 6c9cca9..2bf4149 100644
--- a/arch/mips/kernel/traps.c
+++ b/arch/mips/kernel/traps.c
@@ -735,7 +735,7 @@ void force_fcr31_sig(unsigned long fcr31, void __user *fault_addr,
else if (fcr31 & FPU_CSR_INE_X)
si.si_code = FPE_FLTRES;
else
- si.si_code = FPE_FIXME;
+ return; /* Broken hardware? */
force_sig_info(SIGFPE, &si, tsk);
}
OpenPOWER on IntegriCloud