X-Git-Url: http://www.pilppa.org/gitweb/gitweb.cgi?a=blobdiff_plain;f=fs%2Fbinfmt_elf.c;h=8fcfa398d35075e1e149b70d62226a6095524ad3;hb=99ebcf8285df28f32fd2d1c19a7166e70f00309c;hp=e2159063198a072ef75545130ced4eb21e56accf;hpb=72558dde738b06cc01e16b3247a9659ca739e22d;p=linux-2.6-omap-h63xx.git diff --git a/fs/binfmt_elf.c b/fs/binfmt_elf.c index e2159063198..8fcfa398d35 100644 --- a/fs/binfmt_elf.c +++ b/fs/binfmt_elf.c @@ -1341,20 +1341,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);