X-Git-Url: http://pilppa.org/gitweb/gitweb.cgi?a=blobdiff_plain;f=kernel%2Fkthread.c;h=8e7a7ce3ed0a642f99dc7f73c220722c936e88ac;hb=984f2f377fdfd098f5ae58d09ee04d5e29e6112b;hp=50598e29439a07c3b3acbb318514efa377a44e33;hpb=0a16b6075843325dc402edf80c1662838b929aff;p=linux-2.6-omap-h63xx.git diff --git a/kernel/kthread.c b/kernel/kthread.c index 50598e29439..8e7a7ce3ed0 100644 --- a/kernel/kthread.c +++ b/kernel/kthread.c @@ -172,12 +172,11 @@ EXPORT_SYMBOL(kthread_create); */ void kthread_bind(struct task_struct *k, unsigned int cpu) { - if (k->state != TASK_UNINTERRUPTIBLE) { + /* Must have done schedule() in kthread() before we set_task_cpu */ + if (!wait_task_inactive(k, TASK_UNINTERRUPTIBLE)) { WARN_ON(1); return; } - /* Must have done schedule() in kthread() before we set_task_cpu */ - wait_task_inactive(k, 0); set_task_cpu(k, cpu); k->cpus_allowed = cpumask_of_cpu(cpu); k->rt.nr_cpus_allowed = 1;