]> www.pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - kernel/sched.c
Add early-boot-safety check to cond_resched()
[linux-2.6-omap-h63xx.git] / kernel / sched.c
index 12d291bf3379a38c94d11e600bdb1455781f3d01..3454bb869fd068c070e8fbf219e981018305df99 100644 (file)
@@ -4028,6 +4028,8 @@ static inline void __cond_resched(void)
         */
        if (unlikely(preempt_count()))
                return;
+       if (unlikely(system_state != SYSTEM_RUNNING))
+               return;
        do {
                add_preempt_count(PREEMPT_ACTIVE);
                schedule();