diff options
Diffstat (limited to 'fs/binfmt_elf.c')
-rw-r--r-- | fs/binfmt_elf.c | 19 |
1 files changed, 7 insertions, 12 deletions
diff --git a/fs/binfmt_elf.c b/fs/binfmt_elf.c index e2159063198a..8fcfa398d350 100644 --- a/fs/binfmt_elf.c +++ b/fs/binfmt_elf.c | |||
@@ -1341,20 +1341,15 @@ static void fill_prstatus(struct elf_prstatus *prstatus, | |||
1341 | prstatus->pr_pgrp = task_pgrp_vnr(p); | 1341 | prstatus->pr_pgrp = task_pgrp_vnr(p); |
1342 | prstatus->pr_sid = task_session_vnr(p); | 1342 | prstatus->pr_sid = task_session_vnr(p); |
1343 | if (thread_group_leader(p)) { | 1343 | if (thread_group_leader(p)) { |
1344 | struct task_cputime cputime; | ||
1345 | |||
1344 | /* | 1346 | /* |
1345 | * This is the record for the group leader. Add in the | 1347 | * This is the record for the group leader. It shows the |
1346 | * cumulative times of previous dead threads. This total | 1348 | * group-wide total, not its individual thread total. |
1347 | * won't include the time of each live thread whose state | ||
1348 | * is included in the core dump. The final total reported | ||
1349 | * to our parent process when it calls wait4 will include | ||
1350 | * those sums as well as the little bit more time it takes | ||
1351 | * this and each other thread to finish dying after the | ||
1352 | * core dump synchronization phase. | ||
1353 | */ | 1349 | */ |
1354 | cputime_to_timeval(cputime_add(p->utime, p->signal->utime), | 1350 | thread_group_cputime(p, &cputime); |
1355 | &prstatus->pr_utime); | 1351 | cputime_to_timeval(cputime.utime, &prstatus->pr_utime); |
1356 | cputime_to_timeval(cputime_add(p->stime, p->signal->stime), | 1352 | cputime_to_timeval(cputime.stime, &prstatus->pr_stime); |
1357 | &prstatus->pr_stime); | ||
1358 | } else { | 1353 | } else { |
1359 | cputime_to_timeval(p->utime, &prstatus->pr_utime); | 1354 | cputime_to_timeval(p->utime, &prstatus->pr_utime); |
1360 | cputime_to_timeval(p->stime, &prstatus->pr_stime); | 1355 | cputime_to_timeval(p->stime, &prstatus->pr_stime); |