diff options
author | Mark Brown <broonie@kernel.org> | 2017-08-21 20:32:58 +0200 |
---|---|---|
committer | Mark Brown <broonie@kernel.org> | 2017-08-21 20:32:58 +0200 |
commit | 6329b1bb4e691b24e51ea940b3c2cffd402bd5f8 (patch) | |
tree | 1e01171ec074d83637f3249a64c179b2147e8e4b /kernel/signal.c | |
parent | Merge branches 'topic/dmic' and 'topic/qcom' of git://git.kernel.org/pub/scm/... (diff) | |
parent | Linux 4.13-rc6 (diff) | |
download | linux-6329b1bb4e691b24e51ea940b3c2cffd402bd5f8.tar.xz linux-6329b1bb4e691b24e51ea940b3c2cffd402bd5f8.zip |
Merge tag 'v4.13-rc6' into asoc-msm8916
Linux 4.13-rc6
Diffstat (limited to 'kernel/signal.c')
-rw-r--r-- | kernel/signal.c | 17 |
1 files changed, 12 insertions, 5 deletions
diff --git a/kernel/signal.c b/kernel/signal.c index caed9133ae52..ed804a470dcd 100644 --- a/kernel/signal.c +++ b/kernel/signal.c @@ -1194,7 +1194,11 @@ force_sig_info(int sig, struct siginfo *info, struct task_struct *t) recalc_sigpending_and_wake(t); } } - if (action->sa.sa_handler == SIG_DFL) + /* + * Don't clear SIGNAL_UNKILLABLE for traced tasks, users won't expect + * debugging to leave init killable. + */ + if (action->sa.sa_handler == SIG_DFL && !t->ptrace) t->signal->flags &= ~SIGNAL_UNKILLABLE; ret = specific_send_sig_info(sig, info, t); spin_unlock_irqrestore(&t->sighand->siglock, flags); @@ -3303,12 +3307,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 |