From: Dmitry Adamushko From the POV of synchronization, there should be no need to call wake_up_process() with the 'kthread_create_lock' being held. Signed-off-by: Dmitry Adamushko Cc: Nick Piggin Cc: Ingo Molnar Cc: Rusty Russell Cc: "Paul E. McKenney" Cc: Peter Zijlstra Cc: Andy Whitcroft Cc: Oleg Nesterov Signed-off-by: Andrew Morton --- kernel/kthread.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff -puN kernel/kthread.c~kthread-call-wake_up_process-without-the-lock-being-held kernel/kthread.c --- a/kernel/kthread.c~kthread-call-wake_up_process-without-the-lock-being-held +++ a/kernel/kthread.c @@ -145,9 +145,9 @@ struct task_struct *kthread_create(int ( 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)) { _