summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKOSAKI Motohiro <kosaki.motohiro@jp.fujitsu.com>2009-01-04 05:40:37 +0900
committerGreg Kroah-Hartman <gregkh@suse.de>2009-01-18 10:44:05 -0800
commit66d8431bb666e3ef198d2d20ced134b1b48bc276 (patch)
tree5aaf9778dc8111b959977cd8229d128e743bc480
parent85b3e92b1a4c3d5fa28c7f19726ec978540cc9a2 (diff)
getrusage: RUSAGE_THREAD should return ru_utime and ru_stime
commit 8916edef5888c5d8fe283714416a9ca95b4c3431 upstream. Impact: task stats regression fix Original getrusage(RUSAGE_THREAD) implementation can return ru_utime and ru_stime. But commit "f06febc: timers: fix itimer/many thread hang" broke it. this patch restores it. Signed-off-by: KOSAKI Motohiro <kosaki.motohiro@jp.fujitsu.com> Acked-by: Roland McGrath <roland@redhat.com> Signed-off-by: Ingo Molnar <mingo@elte.hu> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
-rw-r--r--kernel/sys.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/kernel/sys.c b/kernel/sys.c
index 1753312b02f2..855eebba42a9 100644
--- a/kernel/sys.c
+++ b/kernel/sys.c
@@ -1553,6 +1553,8 @@ static void k_getrusage(struct task_struct *p, int who, struct rusage *r)
utime = stime = cputime_zero;
if (who == RUSAGE_THREAD) {
+ utime = task_utime(current);
+ stime = task_stime(current);
accumulate_thread_rusage(p, r);
goto out;
}