From cbd9b67bd3883dff0ef4b8ec9229d315a9ba38f0 Mon Sep 17 00:00:00 2001 From: Dmitry Adamushko Date: Tue, 29 Apr 2008 00:59:23 -0700 Subject: [PATCH] kthread: call wake_up_process() without the lock being held 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 Signed-off-by: Linus Torvalds --- kernel/kthread.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/kernel/kthread.c b/kernel/kthread.c index 92cf6930ab..ac72eea483 100644 --- a/kernel/kthread.c +++ b/kernel/kthread.c @@ -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)) { -- 2.39.5