Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1760563Ab3D2TRu (ORCPT ); Mon, 29 Apr 2013 15:17:50 -0400 Received: from mail-qc0-f170.google.com ([209.85.216.170]:57119 "EHLO mail-qc0-f170.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1760548Ab3D2TRq (ORCPT ); Mon, 29 Apr 2013 15:17:46 -0400 Message-ID: <517EC757.20801@gmail.com> Date: Mon, 29 Apr 2013 15:17:43 -0400 From: KOSAKI Motohiro User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.8; rv:17.0) Gecko/20130328 Thunderbird/17.0.5 MIME-Version: 1.0 To: linux-kernel@vger.kernel.org CC: KOSAKI Motohiro , Olivier Langlois , Martin Schwidefsky , Steven Rostedt , David Miller , Thomas Gleixner , Frederic Weisbecker , Ingo Molnar , Peter Zijlstra , kosaki.motohiro@gmail.com Subject: [BUGFIX PATCH 3/2] posix-cpu-timers: check_thread_timers() uses task_sched_runtime() References: <1367216762-3933-1-git-send-email-kosaki.motohiro@gmail.com> In-Reply-To: <1367216762-3933-1-git-send-email-kosaki.motohiro@gmail.com> Content-Type: text/plain; charset=ISO-2022-JP Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1440 Lines: 38 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: Martin Schwidefsky Cc: Steven Rostedt Cc: Thomas Gleixner Cc: Frederic Weisbecker Cc: Ingo Molnar Cc: 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 dc61bc3..651b6c7 100644 --- a/kernel/posix-cpu-timers.c +++ b/kernel/posix-cpu-timers.c @@ -944,7 +944,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/