aboutsummaryrefslogtreecommitdiffstats
path: root/fs/binfmt_elf_fdpic.c
diff options
context:
space:
mode:
authorPaul Mundt <lethal@linux-sh.org>2008-10-20 23:07:40 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2008-10-20 23:17:18 -0400
commit2515ddc6db8eb49a79f0fe5e67ff09ac7c81eab4 (patch)
treeb5c9983fd79b6627e47e80a74b68ad15cf2d9b41 /fs/binfmt_elf_fdpic.c
parenta50c22eed593f474e75f693381e4d42e81762de8 (diff)
binfmt_elf_fdpic: Update for cputime changes.
Commit f06febc96ba8e0af80bcc3eaec0a109e88275fac ("timers: fix itimer/ many thread hang") introduced a new task_cputime interface and subsequently only converted binfmt_elf over to it. This results in the build for binfmt_elf_fdpic blowing up given that p->signal->{u,s}time have disappeared from underneath us. Apply the same trivial fix from binfmt_elf to binfmt_elf_fdpic. Signed-off-by: Paul Mundt <lethal@linux-sh.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'fs/binfmt_elf_fdpic.c')
-rw-r--r--fs/binfmt_elf_fdpic.c19
1 files changed, 7 insertions, 12 deletions
diff --git a/fs/binfmt_elf_fdpic.c b/fs/binfmt_elf_fdpic.c
index 0e8367c54624..5b5424cb3391 100644
--- a/fs/binfmt_elf_fdpic.c
+++ b/fs/binfmt_elf_fdpic.c
@@ -1390,20 +1390,15 @@ static void fill_prstatus(struct elf_prstatus *prstatus,
1390 prstatus->pr_pgrp = task_pgrp_vnr(p); 1390 prstatus->pr_pgrp = task_pgrp_vnr(p);
1391 prstatus->pr_sid = task_session_vnr(p); 1391 prstatus->pr_sid = task_session_vnr(p);
1392 if (thread_group_leader(p)) { 1392 if (thread_group_leader(p)) {
1393 struct task_cputime cputime;
1394
1393 /* 1395 /*
1394 * This is the record for the group leader. Add in the 1396 * This is the record for the group leader. It shows the
1395 * cumulative times of previous dead threads. This total 1397 * group-wide total, not its individual thread total.
1396 * won't include the time of each live thread whose state
1397 * is included in the core dump. The final total reported
1398 * to our parent process when it calls wait4 will include
1399 * those sums as well as the little bit more time it takes
1400 * this and each other thread to finish dying after the
1401 * core dump synchronization phase.
1402 */ 1398 */
1403 cputime_to_timeval(cputime_add(p->utime, p->signal->utime), 1399 thread_group_cputime(p, &cputime);
1404 &prstatus->pr_utime); 1400 cputime_to_timeval(cputime.utime, &prstatus->pr_utime);
1405 cputime_to_timeval(cputime_add(p->stime, p->signal->stime), 1401 cputime_to_timeval(cputime.stime, &prstatus->pr_stime);
1406 &prstatus->pr_stime);
1407 } else { 1402 } else {
1408 cputime_to_timeval(p->utime, &prstatus->pr_utime); 1403 cputime_to_timeval(p->utime, &prstatus->pr_utime);
1409 cputime_to_timeval(p->stime, &prstatus->pr_stime); 1404 cputime_to_timeval(p->stime, &prstatus->pr_stime);