From: Peter Zijlstra <a.p.zijlstra@chello.nl>
To: Ingo Molnar <mingo@elte.hu>
Cc: Linus Torvalds <torvalds@linux-foundation.org>,
linux-kernel <linux-kernel@vger.kernel.org>,
Mike Galbraith <efault@gmx.de>, bruno <bruno@wolff.to>
Subject: [PATCH] sched: Fix 32bit race
Date: Tue, 12 Jul 2011 14:07:14 +0200 [thread overview]
Message-ID: <1310472434.14978.27.camel@twins> (raw)
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 <a.p.zijlstra@chello.nl>
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 <bruno@wolff.to>
Signed-off-by: Peter Zijlstra <a.p.zijlstra@chello.nl>
---
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)
next reply other threads:[~2011-07-12 12:07 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-07-12 12:07 Peter Zijlstra [this message]
2011-07-12 12:34 ` [PATCH] sched: Fix 32bit race Bruno Wolff III
2011-07-12 20:09 ` Paul E. McKenney
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1310472434.14978.27.camel@twins \
--to=a.p.zijlstra@chello.nl \
--cc=bruno@wolff.to \
--cc=efault@gmx.de \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@elte.hu \
--cc=torvalds@linux-foundation.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox