diff options
Diffstat (limited to 'kernel/kthread.c')
| -rw-r--r-- | kernel/kthread.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/kernel/kthread.c b/kernel/kthread.c index 92cf6930ab51..bd1b9ea024e1 100644 --- a/kernel/kthread.c +++ b/kernel/kthread.c | |||
| @@ -98,7 +98,7 @@ static void create_kthread(struct kthread_create_info *create) | |||
| 98 | struct sched_param param = { .sched_priority = 0 }; | 98 | struct sched_param param = { .sched_priority = 0 }; |
| 99 | wait_for_completion(&create->started); | 99 | wait_for_completion(&create->started); |
| 100 | read_lock(&tasklist_lock); | 100 | read_lock(&tasklist_lock); |
| 101 | create->result = find_task_by_pid(pid); | 101 | create->result = find_task_by_pid_ns(pid, &init_pid_ns); |
| 102 | read_unlock(&tasklist_lock); | 102 | read_unlock(&tasklist_lock); |
| 103 | /* | 103 | /* |
| 104 | * root may have changed our (kthreadd's) priority or CPU mask. | 104 | * root may have changed our (kthreadd's) priority or CPU mask. |
| @@ -144,9 +144,9 @@ struct task_struct *kthread_create(int (*threadfn)(void *data), | |||
| 144 | 144 | ||
| 145 | spin_lock(&kthread_create_lock); | 145 | spin_lock(&kthread_create_lock); |
| 146 | list_add_tail(&create.list, &kthread_create_list); | 146 | list_add_tail(&create.list, &kthread_create_list); |
| 147 | wake_up_process(kthreadd_task); | ||
| 148 | spin_unlock(&kthread_create_lock); | 147 | spin_unlock(&kthread_create_lock); |
| 149 | 148 | ||
| 149 | wake_up_process(kthreadd_task); | ||
| 150 | wait_for_completion(&create.done); | 150 | wait_for_completion(&create.done); |
| 151 | 151 | ||
| 152 | if (!IS_ERR(create.result)) { | 152 | if (!IS_ERR(create.result)) { |
