]> err.no Git - linux-2.6/blobdiff - kernel/kthread.c
V4L/DVB (7757): ivtv: add autodetect for the AVermedia M104 card
[linux-2.6] / kernel / kthread.c
index 92dd1bcaa0df08d652059266c87ea96622c139a1..ac72eea48339cc672cea19962a95e246f87abb83 100644 (file)
@@ -144,9 +144,9 @@ struct task_struct *kthread_create(int (*threadfn)(void *data),
 
        spin_lock(&kthread_create_lock);
        list_add_tail(&create.list, &kthread_create_list);
-       wake_up_process(kthreadd_task);
        spin_unlock(&kthread_create_lock);
 
+       wake_up_process(kthreadd_task);
        wait_for_completion(&create.done);
 
        if (!IS_ERR(create.result)) {
@@ -179,6 +179,7 @@ void kthread_bind(struct task_struct *k, unsigned int cpu)
        wait_task_inactive(k);
        set_task_cpu(k, cpu);
        k->cpus_allowed = cpumask_of_cpu(cpu);
+       k->rt.nr_cpus_allowed = 1;
 }
 EXPORT_SYMBOL(kthread_bind);