]> www.pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - kernel/kthread.c
kthread: call wake_up_process() without the lock being held
[linux-2.6-omap-h63xx.git] / kernel / kthread.c
index 92cf6930ab51a74e034ae9db30d72b21e9a84e9d..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)) {