Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755374Ab3EZVhY (ORCPT ); Sun, 26 May 2013 17:37:24 -0400 Received: from mail-vb0-f51.google.com ([209.85.212.51]:56253 "EHLO mail-vb0-f51.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755161Ab3EZVhV (ORCPT ); Sun, 26 May 2013 17:37:21 -0400 From: kosaki.motohiro@gmail.com To: linux-kernel@vger.kernel.org Cc: Olivier Langlois , Thomas Gleixner , Frederic Weisbecker , Ingo Molnar , Peter Zijlstra , KOSAKI Motohiro Subject: [PATCH 5/8] posix-cpu-timers: check_thread_timers() uses task_sched_runtime() Date: Sun, 26 May 2013 17:35:46 -0400 Message-Id: <1369604149-13016-8-git-send-email-kosaki.motohiro@gmail.com> X-Mailer: git-send-email 1.7.1 In-Reply-To: <1369604149-13016-1-git-send-email-kosaki.motohiro@gmail.com> References: <1369604149-13016-1-git-send-email-kosaki.motohiro@gmail.com> Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1415 Lines: 37 From: KOSAKI Motohiro A type of tsk->se.sum_exec_runtime is u64. Thus, reading it is racy when running 32bit. We should use task_sched_runtime(). Cc: Olivier Langlois Cc: Thomas Gleixner Cc: Frederic Weisbecker Cc: Ingo Molnar Acked-by: Peter Zijlstra Signed-off-by: KOSAKI Motohiro --- kernel/posix-cpu-timers.c | 3 ++- 1 files changed, 2 insertions(+), 1 deletions(-) diff --git a/kernel/posix-cpu-timers.c b/kernel/posix-cpu-timers.c index 1b33c77..62466d4 100644 --- a/kernel/posix-cpu-timers.c +++ b/kernel/posix-cpu-timers.c @@ -1008,7 +1008,8 @@ static void check_thread_timers(struct task_struct *tsk, struct cpu_timer_list *t = list_first_entry(timers, struct cpu_timer_list, entry); - if (!--maxfire || tsk->se.sum_exec_runtime < t->expires.sched) { + unsigned long long runtime = task_sched_runtime(tsk, false); + if (!--maxfire || runtime < t->expires.sched) { tsk->cputime_expires.sched_exp = t->expires.sched; break; } -- 1.7.1 -- 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/