summaryrefslogtreecommitdiffstats
path: root/kernel/signal.c
diff options
context:
space:
mode:
authorIngo Molnar <mingo@kernel.org>2017-08-10 12:20:53 +0200
committerIngo Molnar <mingo@kernel.org>2017-08-10 12:20:53 +0200
commit388f8e127337aa55037195fc4c4528fc5f69ff2d (patch)
tree4c8af2f385143ecda7c4b6ec01b33536f5b2a068 /kernel/signal.c
parentbc2eecd7ecce40af43b6eb3d256b6076257df846 (diff)
parent8d31f80eb38819e4f2905ad21c0e8998382a08f7 (diff)
downloadlinux-388f8e127337aa55037195fc4c4528fc5f69ff2d.tar.gz
linux-388f8e127337aa55037195fc4c4528fc5f69ff2d.tar.bz2
linux-388f8e127337aa55037195fc4c4528fc5f69ff2d.zip
Merge branch 'linus' into locking/core, to pick up fixes
Signed-off-by: Ingo Molnar <mingo@kernel.org>
Diffstat (limited to 'kernel/signal.c')
-rw-r--r--kernel/signal.c11
1 files changed, 7 insertions, 4 deletions
diff --git a/kernel/signal.c b/kernel/signal.c
index caed9133ae52..7e33f8c583e6 100644
--- a/kernel/signal.c
+++ b/kernel/signal.c
@@ -3303,12 +3303,15 @@ SYSCALL_DEFINE1(sigpending, old_sigset_t __user *, set)
#ifdef CONFIG_COMPAT
COMPAT_SYSCALL_DEFINE1(sigpending, compat_old_sigset_t __user *, set32)
{
+#ifdef __BIG_ENDIAN
sigset_t set;
- int err = do_sigpending(&set, sizeof(old_sigset_t));
- if (err == 0)
- if (copy_to_user(set32, &set, sizeof(old_sigset_t)))
- err = -EFAULT;
+ int err = do_sigpending(&set, sizeof(set.sig[0]));
+ if (!err)
+ err = put_user(set.sig[0], set32);
return err;
+#else
+ return sys_rt_sigpending((sigset_t __user *)set32, sizeof(*set32));
+#endif
}
#endif