From: Oleg Nesterov on
do_task_stat()->task_times() can race with getrusage(), they both can
try to update task->prev_Xtime at the same time.

Remove this bit of d180c5bc "sched: Introduce task_times() to replace
task_{u,s}time()".

See also the next patch.

Signed-off-by: Oleg Nesterov <oleg(a)redhat.com>
---

fs/proc/array.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)

--- 34-rc1/fs/proc/array.c~PROC_4_DTS_TASK_TIMES_IS_RACY 2010-03-24 19:53:23.000000000 +0100
+++ 34-rc1/fs/proc/array.c 2010-03-24 19:57:37.000000000 +0100
@@ -449,7 +449,8 @@ static int do_task_stat(struct seq_file
if (!whole) {
min_flt = task->min_flt;
maj_flt = task->maj_flt;
- task_times(task, &utime, &stime);
+ utime = task->utime;
+ stime = task->stime;
gtime = task->gtime;
}


--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo(a)vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/