drivers/input: eliminate INPUT_COMPAT_TEST macro
[linux-2.6-block.git] / kernel / signal.c
index 0508544c8ced0d96913905dc53af68f38b6ee618..aa9bf00749c151b70026a78111149f61f1a99727 100644 (file)
@@ -2708,6 +2708,10 @@ int copy_siginfo_to_user(siginfo_t __user *to, const siginfo_t *from)
                        err |= __put_user(from->si_lower, &to->si_lower);
                        err |= __put_user(from->si_upper, &to->si_upper);
                }
+#endif
+#ifdef SEGV_PKUERR
+               if (from->si_signo == SIGSEGV && from->si_code == SEGV_PKUERR)
+                       err |= __put_user(from->si_pkey, &to->si_pkey);
 #endif
                break;
        case __SI_CHLD:
@@ -3581,6 +3585,10 @@ __weak const char *arch_vma_name(struct vm_area_struct *vma)
 
 void __init signals_init(void)
 {
+       /* If this check fails, the __ARCH_SI_PREAMBLE_SIZE value is wrong! */
+       BUILD_BUG_ON(__ARCH_SI_PREAMBLE_SIZE
+               != offsetof(struct siginfo, _sifields._pad));
+
        sigqueue_cachep = KMEM_CACHE(sigqueue, SLAB_PANIC);
 }