aboutsummaryrefslogtreecommitdiffstats
path: root/kernel/signal.c
diff options
context:
space:
mode:
Diffstat (limited to 'kernel/signal.c')
-rw-r--r--kernel/signal.c14
1 files changed, 9 insertions, 5 deletions
diff --git a/kernel/signal.c b/kernel/signal.c
index e661b01d340f..4530fc654455 100644
--- a/kernel/signal.c
+++ b/kernel/signal.c
@@ -27,6 +27,7 @@
27#include <linux/freezer.h> 27#include <linux/freezer.h>
28#include <linux/pid_namespace.h> 28#include <linux/pid_namespace.h>
29#include <linux/nsproxy.h> 29#include <linux/nsproxy.h>
30#include <trace/sched.h>
30 31
31#include <asm/param.h> 32#include <asm/param.h>
32#include <asm/uaccess.h> 33#include <asm/uaccess.h>
@@ -803,6 +804,8 @@ static int send_signal(int sig, struct siginfo *info, struct task_struct *t,
803 struct sigpending *pending; 804 struct sigpending *pending;
804 struct sigqueue *q; 805 struct sigqueue *q;
805 806
807 trace_sched_signal_send(sig, t);
808
806 assert_spin_locked(&t->sighand->siglock); 809 assert_spin_locked(&t->sighand->siglock);
807 if (!prepare_signal(sig, t)) 810 if (!prepare_signal(sig, t))
808 return 0; 811 return 0;
@@ -1141,7 +1144,8 @@ static int kill_something_info(int sig, struct siginfo *info, pid_t pid)
1141 struct task_struct * p; 1144 struct task_struct * p;
1142 1145
1143 for_each_process(p) { 1146 for_each_process(p) {
1144 if (p->pid > 1 && !same_thread_group(p, current)) { 1147 if (task_pid_vnr(p) > 1 &&
1148 !same_thread_group(p, current)) {
1145 int err = group_send_sig_info(sig, info, p); 1149 int err = group_send_sig_info(sig, info, p);
1146 ++count; 1150 ++count;
1147 if (err != -EPERM) 1151 if (err != -EPERM)
@@ -1338,6 +1342,7 @@ int do_notify_parent(struct task_struct *tsk, int sig)
1338 struct siginfo info; 1342 struct siginfo info;
1339 unsigned long flags; 1343 unsigned long flags;
1340 struct sighand_struct *psig; 1344 struct sighand_struct *psig;
1345 struct task_cputime cputime;
1341 int ret = sig; 1346 int ret = sig;
1342 1347
1343 BUG_ON(sig == -1); 1348 BUG_ON(sig == -1);
@@ -1368,10 +1373,9 @@ int do_notify_parent(struct task_struct *tsk, int sig)
1368 1373
1369 info.si_uid = tsk->uid; 1374 info.si_uid = tsk->uid;
1370 1375
1371 info.si_utime = cputime_to_clock_t(cputime_add(tsk->utime, 1376 thread_group_cputime(tsk, &cputime);
1372 tsk->signal->utime)); 1377 info.si_utime = cputime_to_jiffies(cputime.utime);
1373 info.si_stime = cputime_to_clock_t(cputime_add(tsk->stime, 1378 info.si_stime = cputime_to_jiffies(cputime.stime);
1374 tsk->signal->stime));
1375 1379
1376 info.si_status = tsk->exit_code & 0x7f; 1380 info.si_status = tsk->exit_code & 0x7f;
1377 if (tsk->exit_code & 0x80) 1381 if (tsk->exit_code & 0x80)