aboutsummaryrefslogtreecommitdiffstats
path: root/kernel/signal.c
diff options
context:
space:
mode:
Diffstat (limited to 'kernel/signal.c')
-rw-r--r--kernel/signal.c12
1 files changed, 8 insertions, 4 deletions
diff --git a/kernel/signal.c b/kernel/signal.c
index 372771e948c2..776a45a3661b 100644
--- a/kernel/signal.c
+++ b/kernel/signal.c
@@ -1638,6 +1638,7 @@ bool do_notify_parent(struct task_struct *tsk, int sig)
1638 unsigned long flags; 1638 unsigned long flags;
1639 struct sighand_struct *psig; 1639 struct sighand_struct *psig;
1640 bool autoreap = false; 1640 bool autoreap = false;
1641 cputime_t utime, stime;
1641 1642
1642 BUG_ON(sig == -1); 1643 BUG_ON(sig == -1);
1643 1644
@@ -1675,8 +1676,9 @@ bool do_notify_parent(struct task_struct *tsk, int sig)
1675 task_uid(tsk)); 1676 task_uid(tsk));
1676 rcu_read_unlock(); 1677 rcu_read_unlock();
1677 1678
1678 info.si_utime = cputime_to_clock_t(tsk->utime + tsk->signal->utime); 1679 task_cputime(tsk, &utime, &stime);
1679 info.si_stime = cputime_to_clock_t(tsk->stime + tsk->signal->stime); 1680 info.si_utime = cputime_to_clock_t(utime + tsk->signal->utime);
1681 info.si_stime = cputime_to_clock_t(stime + tsk->signal->stime);
1680 1682
1681 info.si_status = tsk->exit_code & 0x7f; 1683 info.si_status = tsk->exit_code & 0x7f;
1682 if (tsk->exit_code & 0x80) 1684 if (tsk->exit_code & 0x80)
@@ -1740,6 +1742,7 @@ static void do_notify_parent_cldstop(struct task_struct *tsk,
1740 unsigned long flags; 1742 unsigned long flags;
1741 struct task_struct *parent; 1743 struct task_struct *parent;
1742 struct sighand_struct *sighand; 1744 struct sighand_struct *sighand;
1745 cputime_t utime, stime;
1743 1746
1744 if (for_ptracer) { 1747 if (for_ptracer) {
1745 parent = tsk->parent; 1748 parent = tsk->parent;
@@ -1758,8 +1761,9 @@ static void do_notify_parent_cldstop(struct task_struct *tsk,
1758 info.si_uid = from_kuid_munged(task_cred_xxx(parent, user_ns), task_uid(tsk)); 1761 info.si_uid = from_kuid_munged(task_cred_xxx(parent, user_ns), task_uid(tsk));
1759 rcu_read_unlock(); 1762 rcu_read_unlock();
1760 1763
1761 info.si_utime = cputime_to_clock_t(tsk->utime); 1764 task_cputime(tsk, &utime, &stime);
1762 info.si_stime = cputime_to_clock_t(tsk->stime); 1765 info.si_utime = cputime_to_clock_t(utime);
1766 info.si_stime = cputime_to_clock_t(stime);
1763 1767
1764 info.si_code = why; 1768 info.si_code = why;
1765 switch (why) { 1769 switch (why) {