From: Peter Zijlstra Date: Thu, 21 Jan 2010 15:34:27 +0000 (+0100) Subject: sched: Fix incorrect sanity check X-Git-Tag: firefly_0821_release~10186^2~968 X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=c8035d9f08c1c8bbfe04576dbebe5c6da5621dae;p=firefly-linux-kernel-4.4.55.git sched: Fix incorrect sanity check commit 11854247e2c851e7ff9ce138e501c6cffc5a4217 upstream We moved to migrate on wakeup, which means that sleeping tasks could still be present on offline cpus. Amend the check to only test running tasks. Reported-by: Heiko Carstens Signed-off-by: Peter Zijlstra Signed-off-by: Ingo Molnar Signed-off-by: Mike Galbraith Signed-off-by: Greg Kroah-Hartman --- diff --git a/kernel/cpu.c b/kernel/cpu.c index 1c8ddd6ee940..08e54e7beaed 100644 --- a/kernel/cpu.c +++ b/kernel/cpu.c @@ -151,7 +151,7 @@ static inline void check_for_tasks(int cpu) write_lock_irq(&tasklist_lock); for_each_process(p) { - if (task_cpu(p) == cpu && + if (task_cpu(p) == cpu && p->state == TASK_RUNNING && (!cputime_eq(p->utime, cputime_zero) || !cputime_eq(p->stime, cputime_zero))) printk(KERN_WARNING "Task %s (pid = %d) is on cpu %d\