Merge branch 'upstream' of git://ftp.linux-mips.org/pub/scm/upstream-linus
[cascardo/linux.git] / arch / mips / kernel / signal32.c
index 572c610..652709b 100644 (file)
@@ -482,6 +482,18 @@ int copy_siginfo_to_user32(compat_siginfo_t __user *to, siginfo_t *from)
        return err;
 }
 
+int copy_siginfo_from_user32(siginfo_t *to, compat_siginfo_t __user *from)
+{
+       memset(to, 0, sizeof *to);
+
+       if (copy_from_user(to, from, 3*sizeof(int)) ||
+           copy_from_user(to->_sifields._pad,
+                          from->_sifields._pad, SI_PAD_SIZE32))
+               return -EFAULT;
+
+       return 0;
+}
+
 asmlinkage void sys32_sigreturn(nabi_no_regargs struct pt_regs regs)
 {
        struct sigframe32 __user *frame;