summaryrefslogtreecommitdiff
path: root/fs/binfmt_elf.c
diff options
context:
space:
mode:
authorStephen Rothwell <sfr@canb.auug.org.au>2008-10-20 14:35:06 +1100
committerStephen Rothwell <sfr@canb.auug.org.au>2008-10-20 14:35:06 +1100
commit4b26b04b173ca8207ae54bfba01ee41bc498f982 (patch)
tree76a2f7bb7b0fe40ffb87c44c23af783c9cf73bf3 /fs/binfmt_elf.c
parent208ce148927123773b66996cb0de2b157be2b29d (diff)
parenteeb2d0fcb69ea2dccaf1c1fdfc510cb1973c9b7f (diff)
Merge commit 'timers/auto-timers-next'
Conflicts: arch/x86/kvm/i8254.c
Diffstat (limited to 'fs/binfmt_elf.c')
-rw-r--r--fs/binfmt_elf.c19
1 files changed, 7 insertions, 12 deletions
diff --git a/fs/binfmt_elf.c b/fs/binfmt_elf.c
index c76afa26edf7..83d72006e29d 100644
--- a/fs/binfmt_elf.c
+++ b/fs/binfmt_elf.c
@@ -1333,20 +1333,15 @@ static void fill_prstatus(struct elf_prstatus *prstatus,
prstatus->pr_pgrp = task_pgrp_vnr(p);
prstatus->pr_sid = task_session_vnr(p);
if (thread_group_leader(p)) {
+ struct task_cputime cputime;
+
/*
- * This is the record for the group leader. Add in the
- * cumulative times of previous dead threads. This total
- * won't include the time of each live thread whose state
- * is included in the core dump. The final total reported
- * to our parent process when it calls wait4 will include
- * those sums as well as the little bit more time it takes
- * this and each other thread to finish dying after the
- * core dump synchronization phase.
+ * This is the record for the group leader. It shows the
+ * group-wide total, not its individual thread total.
*/
- cputime_to_timeval(cputime_add(p->utime, p->signal->utime),
- &prstatus->pr_utime);
- cputime_to_timeval(cputime_add(p->stime, p->signal->stime),
- &prstatus->pr_stime);
+ thread_group_cputime(p, &cputime);
+ cputime_to_timeval(cputime.utime, &prstatus->pr_utime);
+ cputime_to_timeval(cputime.stime, &prstatus->pr_stime);
} else {
cputime_to_timeval(p->utime, &prstatus->pr_utime);
cputime_to_timeval(p->stime, &prstatus->pr_stime);