Skip to content

Commit

Permalink
signal/mips: Report FPE_FLTUNK for undiagnosed floating point exceptions
Browse files Browse the repository at this point in the history
Most mips builds fail with

arch/mips/kernel/traps.c: In function ‘force_fcr31_sig’:
arch/mips/kernel/traps.c:732:2: error:
	‘si_code’ may be used uninitialized in this function

Fix the problem by initializing si_code with FPE_FLTUNK (undiagnosed
floating point exception).

Fixes: f43a54a ("signal/mips: Use force_sig_fault where appropriate")
Cc: linux-mips@linux-mips.org
Cc: Eric W. Biederman <ebiederm@xmission.com>
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
Signed-off-by: Eric W. Biederman <ebiederm@xmission.com>
  • Loading branch information
Guenter Roeck authored and Eric W. Biederman committed May 17, 2018
1 parent 530621b commit 0bb0a11
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion arch/mips/kernel/traps.c
Original file line number Diff line number Diff line change
Expand Up @@ -716,7 +716,7 @@ asmlinkage void do_ov(struct pt_regs *regs)
void force_fcr31_sig(unsigned long fcr31, void __user *fault_addr,
struct task_struct *tsk)
{
int si_code;
int si_code = FPE_FLTUNK;

if (fcr31 & FPU_CSR_INV_X)
si_code = FPE_FLTINV;
Expand Down

0 comments on commit 0bb0a11

Please sign in to comment.