LKML Archive on lore.kernel.org
help / color / mirror / Atom feed
* [PATCH -next] signal/mips: Report FPE_FLTUNK for undiagnosed floating point exceptions
@ 2018-05-15 13:50 Guenter Roeck
  2018-05-17  1:13 ` Eric W. Biederman
  0 siblings, 1 reply; 2+ messages in thread
From: Guenter Roeck @ 2018-05-15 13:50 UTC (permalink / raw)
  To: James Hogan
  Cc: linux-mips, linux-kernel, Ralf Baechle, Guenter Roeck,
	Eric W . Biederman

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: f43a54a0d916 ("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>
---
Feel free to merge into the patch introducing the problem.

 arch/mips/kernel/traps.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/arch/mips/kernel/traps.c b/arch/mips/kernel/traps.c
index 66ec4b0b484d..d67fa74622ee 100644
--- a/arch/mips/kernel/traps.c
+++ b/arch/mips/kernel/traps.c
@@ -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;
-- 
2.7.4

^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH -next] signal/mips: Report FPE_FLTUNK for undiagnosed floating point exceptions
  2018-05-15 13:50 [PATCH -next] signal/mips: Report FPE_FLTUNK for undiagnosed floating point exceptions Guenter Roeck
@ 2018-05-17  1:13 ` Eric W. Biederman
  0 siblings, 0 replies; 2+ messages in thread
From: Eric W. Biederman @ 2018-05-17  1:13 UTC (permalink / raw)
  To: Guenter Roeck; +Cc: James Hogan, linux-mips, linux-kernel, Ralf Baechle

Guenter Roeck <linux@roeck-us.net> writes:

> 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: f43a54a0d916 ("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>

Applied.  Thank you.

Eric

> ---
> Feel free to merge into the patch introducing the problem.
>
>  arch/mips/kernel/traps.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/arch/mips/kernel/traps.c b/arch/mips/kernel/traps.c
> index 66ec4b0b484d..d67fa74622ee 100644
> --- a/arch/mips/kernel/traps.c
> +++ b/arch/mips/kernel/traps.c
> @@ -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;

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2018-05-17  1:13 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-05-15 13:50 [PATCH -next] signal/mips: Report FPE_FLTUNK for undiagnosed floating point exceptions Guenter Roeck
2018-05-17  1:13 ` Eric W. Biederman

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).