From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753361Ab1GLMHl (ORCPT ); Tue, 12 Jul 2011 08:07:41 -0400 Received: from casper.infradead.org ([85.118.1.10]:46591 "EHLO casper.infradead.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753028Ab1GLMHk convert rfc822-to-8bit (ORCPT ); Tue, 12 Jul 2011 08:07:40 -0400 Subject: [PATCH] sched: Fix 32bit race From: Peter Zijlstra To: Ingo Molnar Cc: Linus Torvalds , linux-kernel , Mike Galbraith , bruno Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 8BIT Date: Tue, 12 Jul 2011 14:07:14 +0200 Message-ID: <1310472434.14978.27.camel@twins> Mime-Version: 1.0 X-Mailer: Evolution 2.30.3 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Ingo, can we get the below patch into sched/urgent and towards Linus before he cuts a release? I'm surprised there weren't more 32bit-smp doesn't boot for me complaints, either Bruno is a very 'lucky' man, or nobody is using 32bit kernels any more since he was hitting this quite reliably. --- Subject: sched: Fix 32bit race From: Peter Zijlstra Date: Mon Jul 11 16:28:50 CEST 2011 Commit 3fe1698b7fe0 ("sched: Deal with non-atomic min_vruntime reads on 32bit") forgot to initialize min_vruntime_copy which could lead to an infinite while loop in task_waking_fair() under some circumstances (early boot, lucky timing). Reported-and-tested-by: Bruno Wolff III Signed-off-by: Peter Zijlstra --- Index: linux-2.6/kernel/sched.c =================================================================== --- linux-2.6.orig/kernel/sched.c +++ linux-2.6/kernel/sched.c @@ -7750,6 +7750,9 @@ static void init_cfs_rq(struct cfs_rq *c #endif #endif cfs_rq->min_vruntime = (u64)(-(1LL << 20)); +#ifndef CONFIG_64BIT + cfs_rq->min_vruntime_copy = cfs_rq->min_vruntime; +#endif } static void init_rt_rq(struct rt_rq *rt_rq, struct rq *rq)