Commit 8916edef authored by KOSAKI Motohiro's avatar KOSAKI Motohiro Committed by Ingo Molnar
Browse files

getrusage: RUSAGE_THREAD should return ru_utime and ru_stime



Impact: task stats regression fix

Original getrusage(RUSAGE_THREAD) implementation can return ru_utime and
ru_stime. But commit "f06febc9: timers: fix itimer/many thread hang" broke it.

this patch restores it.

Signed-off-by: default avatarKOSAKI Motohiro <kosaki.motohiro@jp.fujitsu.com>
Acked-by: default avatarRoland McGrath <roland@redhat.com>
Signed-off-by: default avatarIngo Molnar <mingo@elte.hu>
parent 0a582440
Loading
Loading
Loading
Loading
+2 −0
Original line number Diff line number Diff line
@@ -1627,6 +1627,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;
	}