]> Git Repo - linux.git/commitdiff
sched: Fix 32bit race
authorPeter Zijlstra <[email protected]>
Mon, 11 Jul 2011 14:28:50 +0000 (16:28 +0200)
committerLinus Torvalds <[email protected]>
Fri, 15 Jul 2011 16:54:02 +0000 (09:54 -0700)
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).

[ This bug was also reported by others that blamed it on the RCU
  initialization problems ]

Reported-and-tested-by: Bruno Wolff III <[email protected]>
Signed-off-by: Peter Zijlstra <[email protected]>
Reviewed-by: Paul E. McKenney <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
kernel/sched.c

index 9769c756ad6650734f9f038db30064d1c38232f5..3dc716f6d8adfb777ba42dfd92abf00dbafc5988 100644 (file)
@@ -7757,6 +7757,9 @@ static void init_cfs_rq(struct cfs_rq *cfs_rq, struct rq *rq)
 #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)
This page took 0.069657 seconds and 4 git commands to generate.