OSDN Git Service

signal/unicore32: Use send_sig_fault where appropriate
authorEric W. Biederman <ebiederm@xmission.com>
Thu, 19 Apr 2018 22:29:04 +0000 (17:29 -0500)
committerEric W. Biederman <ebiederm@xmission.com>
Thu, 27 Sep 2018 19:59:44 +0000 (21:59 +0200)
Signed-off-by: "Eric W. Biederman" <ebiederm@xmission.com>
arch/unicore32/kernel/fpu-ucf64.c

index 8594b16..fc5dad3 100644 (file)
  */
 void ucf64_raise_sigfpe(struct pt_regs *regs)
 {
-       siginfo_t info;
-
-       clear_siginfo(&info);
-
-       info.si_signo = SIGFPE;
-       info.si_code = FPE_FLTUNK;
-       info.si_addr = (void __user *)(instruction_pointer(regs) - 4);
-
        /*
         * This is the same as NWFPE, because it's not clear what
         * this is used for
@@ -69,7 +61,9 @@ void ucf64_raise_sigfpe(struct pt_regs *regs)
        current->thread.error_code = 0;
        current->thread.trap_no = 6;
 
-       send_sig_info(SIGFPE, &info, current);
+       send_sig_fault(SIGFPE, FPE_FLTUNK,
+                      (void __user *)(instruction_pointer(regs) - 4),
+                      current);
 }
 
 /*