Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S934474AbZAOU4m (ORCPT ); Thu, 15 Jan 2009 15:56:42 -0500 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S932368AbZAOUDW (ORCPT ); Thu, 15 Jan 2009 15:03:22 -0500 Received: from kroah.org ([198.145.64.141]:49884 "EHLO coco.kroah.org" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S932184AbZAOUDK (ORCPT ); Thu, 15 Jan 2009 15:03:10 -0500 Date: Thu, 15 Jan 2009 12:00:46 -0800 From: Greg KH To: linux-kernel@vger.kernel.org, stable@kernel.org Cc: Justin Forbes , Zwane Mwaikambo , "Theodore Ts'o" , Randy Dunlap , Dave Jones , Chuck Wolber , Chris Wedgwood , Michael Krufky , Chuck Ebbert , Domenico Andreoli , Willy Tarreau , Rodrigo Rubira Branco , Jake Edge , Eugene Teo , torvalds@linux-foundation.org, akpm@linux-foundation.org, alan@lxorguk.ukuu.org.uk, KOSAKI Motohiro , Roland McGrath , Ingo Molnar Subject: [patch 92/94] getrusage: RUSAGE_THREAD should return ru_utime and ru_stime Message-ID: <20090115200046.GN14419@kroah.com> References: <20090115194806.804618825@mini.kroah.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline; filename="getrusage-rusage_thread-should-return-ru_utime-and-ru_stime.patch" In-Reply-To: <20090115195520.GA14403@kroah.com> User-Agent: Mutt/1.5.16 (2007-06-09) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1220 Lines: 41 2.6.28-stable review patch. If anyone has any objections, please let us know. ------------------ From: KOSAKI Motohiro 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 Acked-by: Roland McGrath Signed-off-by: Ingo Molnar Signed-off-by: Greg Kroah-Hartman --- kernel/sys.c | 2 ++ 1 file changed, 2 insertions(+) --- a/kernel/sys.c +++ b/kernel/sys.c @@ -1553,6 +1553,8 @@ static void k_getrusage(struct task_stru utime = stime = cputime_zero; if (who == RUSAGE_THREAD) { + utime = task_utime(current); + stime = task_stime(current); accumulate_thread_rusage(p, r); goto out; } -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/