Merge tag 'linux-watchdog-4.20-rc1' of git://www.linux-watchdog.org/linux-watchdog
[sfrench/cifs-2.6.git] / arch / arm / kernel / swp_emulate.c
index 80517f293eb9c84c58935214174033bfe80ea892..a188d5e8ab7fa1c32f42a22d612a69603ea7629a 100644 (file)
@@ -98,22 +98,20 @@ static int proc_status_show(struct seq_file *m, void *v)
  */
 static void set_segfault(struct pt_regs *regs, unsigned long addr)
 {
-       siginfo_t info;
+       int si_code;
 
-       clear_siginfo(&info);
        down_read(&current->mm->mmap_sem);
        if (find_vma(current->mm, addr) == NULL)
-               info.si_code = SEGV_MAPERR;
+               si_code = SEGV_MAPERR;
        else
-               info.si_code = SEGV_ACCERR;
+               si_code = SEGV_ACCERR;
        up_read(&current->mm->mmap_sem);
 
-       info.si_signo = SIGSEGV;
-       info.si_errno = 0;
-       info.si_addr  = (void *) instruction_pointer(regs);
-
        pr_debug("SWP{B} emulation: access caused memory abort!\n");
-       arm_notify_die("Illegal memory access", regs, &info, 0, 0);
+       arm_notify_die("Illegal memory access", regs,
+                      SIGSEGV, si_code,
+                      (void __user *)instruction_pointer(regs),
+                      0, 0);
 
        abtcounter++;
 }