aboutsummaryrefslogtreecommitdiffstats
path: root/kernel/signal.c
diff options
context:
space:
mode:
authorDmitry Torokhov <dmitry.torokhov@gmail.com>2013-06-28 02:00:25 -0400
committerDmitry Torokhov <dmitry.torokhov@gmail.com>2013-06-28 02:00:25 -0400
commit31881d74b6dd1a6c530cff61248def4f2da38bee (patch)
treebe62420cf39192074e13b25553d172b9d5e58a33 /kernel/signal.c
parent8855f30cd2b68012571932c7b01290c20be4508c (diff)
parent257867dc8d893690c175c1f717f91c3b6d44a63d (diff)
Merge branch 'for-next' of git://github.com/rydberg/linux into next
Pull in changes from Henrik: "a trivial MT documentation fix".
Diffstat (limited to 'kernel/signal.c')
-rw-r--r--kernel/signal.c13
1 files changed, 8 insertions, 5 deletions
diff --git a/kernel/signal.c b/kernel/signal.c
index dd72567767d9..113411bfe8b1 100644
--- a/kernel/signal.c
+++ b/kernel/signal.c
@@ -32,6 +32,7 @@
32#include <linux/user_namespace.h> 32#include <linux/user_namespace.h>
33#include <linux/uprobes.h> 33#include <linux/uprobes.h>
34#include <linux/compat.h> 34#include <linux/compat.h>
35#include <linux/cn_proc.h>
35#define CREATE_TRACE_POINTS 36#define CREATE_TRACE_POINTS
36#include <trace/events/signal.h> 37#include <trace/events/signal.h>
37 38
@@ -854,12 +855,14 @@ static void ptrace_trap_notify(struct task_struct *t)
854 * Returns true if the signal should be actually delivered, otherwise 855 * Returns true if the signal should be actually delivered, otherwise
855 * it should be dropped. 856 * it should be dropped.
856 */ 857 */
857static int prepare_signal(int sig, struct task_struct *p, bool force) 858static bool prepare_signal(int sig, struct task_struct *p, bool force)
858{ 859{
859 struct signal_struct *signal = p->signal; 860 struct signal_struct *signal = p->signal;
860 struct task_struct *t; 861 struct task_struct *t;
861 862
862 if (unlikely(signal->flags & SIGNAL_GROUP_EXIT)) { 863 if (signal->flags & (SIGNAL_GROUP_EXIT | SIGNAL_GROUP_COREDUMP)) {
864 if (signal->flags & SIGNAL_GROUP_COREDUMP)
865 return sig == SIGKILL;
863 /* 866 /*
864 * The process is in the middle of dying, nothing to do. 867 * The process is in the middle of dying, nothing to do.
865 */ 868 */
@@ -1160,8 +1163,7 @@ static int send_signal(int sig, struct siginfo *info, struct task_struct *t,
1160static void print_fatal_signal(int signr) 1163static void print_fatal_signal(int signr)
1161{ 1164{
1162 struct pt_regs *regs = signal_pt_regs(); 1165 struct pt_regs *regs = signal_pt_regs();
1163 printk(KERN_INFO "%s/%d: potentially unexpected fatal signal %d.\n", 1166 printk(KERN_INFO "potentially unexpected fatal signal %d.\n", signr);
1164 current->comm, task_pid_nr(current), signr);
1165 1167
1166#if defined(__i386__) && !defined(__arch_um__) 1168#if defined(__i386__) && !defined(__arch_um__)
1167 printk(KERN_INFO "code at %08lx: ", regs->ip); 1169 printk(KERN_INFO "code at %08lx: ", regs->ip);
@@ -2350,6 +2352,7 @@ relock:
2350 if (sig_kernel_coredump(signr)) { 2352 if (sig_kernel_coredump(signr)) {
2351 if (print_fatal_signals) 2353 if (print_fatal_signals)
2352 print_fatal_signal(info->si_signo); 2354 print_fatal_signal(info->si_signo);
2355 proc_coredump_connector(current);
2353 /* 2356 /*
2354 * If it was able to dump core, this kills all 2357 * If it was able to dump core, this kills all
2355 * other threads in the group and synchronizes with 2358 * other threads in the group and synchronizes with
@@ -2948,7 +2951,7 @@ do_send_specific(pid_t tgid, pid_t pid, int sig, struct siginfo *info)
2948 2951
2949static int do_tkill(pid_t tgid, pid_t pid, int sig) 2952static int do_tkill(pid_t tgid, pid_t pid, int sig)
2950{ 2953{
2951 struct siginfo info; 2954 struct siginfo info = {};
2952 2955
2953 info.si_signo = sig; 2956 info.si_signo = sig;
2954 info.si_errno = 0; 2957 info.si_errno = 0;