lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <20090104053654.069C.KOSAKI.MOTOHIRO@jp.fujitsu.com>
Date:	Sun, 4 Jan 2009 05:40:37 +0900 (JST)
From:	KOSAKI Motohiro <kosaki.motohiro@...fujitsu.com>
To:	Roland McGrath <roland@...hat.com>,
	Sripathi Kodi <sripathik@...ibm.com>,
	Ingo Molnar <mingo@...e.hu>, Frank Mayhar <fmayhar@...gle.com>,
	LKML <linux-kernel@...r.kernel.org>
Cc:	kosaki.motohiro@...fujitsu.com
Subject: [PATCH] getrusage: RUSAGE_THREAD should return ru_utime and ru_stime


I believe that's bugfix. not new implement.

==
Subject: [PATCH] getrusage: RUSAGE_THREAD should return ru_utime and ru_stime
Impact: regression fix

Original getrusage(RUSAGE_THREAD) implementation can return ru_utime and ru_stime.
but unforunately commit f06febc96ba8e0af80bcc3eaec0a109e88275fac break it.

this patch restore it.


Signed-off-by: KOSAKI Motohiro <kosaki.motohiro@...fujitsu.com>
CC: Roland McGrath <roland@...hat.com>
CC: Sripathi Kodi <sripathik@...ibm.com>
Cc: Ingo Molnar <mingo@...e.hu>
CC: Frank Mayhar <fmayhar@...gle.com>
---
 kernel/sys.c |    2 ++
 1 file changed, 2 insertions(+)

Index: b/kernel/sys.c
===================================================================
--- a/kernel/sys.c	2009-01-04 05:01:15.000000000 +0900
+++ b/kernel/sys.c	2009-01-04 05:35:51.000000000 +0900
@@ -1551,6 +1551,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@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ