aboutsummaryrefslogtreecommitdiffstats
path: root/kernel
diff options
context:
space:
mode:
Diffstat (limited to 'kernel')
-rw-r--r--kernel/kthread.c12
1 files changed, 2 insertions, 10 deletions
diff --git a/kernel/kthread.c b/kernel/kthread.c
index a404f7ee7395..dcfe724300eb 100644
--- a/kernel/kthread.c
+++ b/kernel/kthread.c
@@ -214,23 +214,15 @@ int kthread_stop(struct task_struct *k)
214} 214}
215EXPORT_SYMBOL(kthread_stop); 215EXPORT_SYMBOL(kthread_stop);
216 216
217 217int kthreadd(void *unused)
218static noinline __init_refok void kthreadd_setup(void)
219{ 218{
220 struct task_struct *tsk = current; 219 struct task_struct *tsk = current;
221 220
221 /* Setup a clean context for our children to inherit. */
222 set_task_comm(tsk, "kthreadd"); 222 set_task_comm(tsk, "kthreadd");
223
224 ignore_signals(tsk); 223 ignore_signals(tsk);
225
226 set_user_nice(tsk, -5); 224 set_user_nice(tsk, -5);
227 set_cpus_allowed(tsk, CPU_MASK_ALL); 225 set_cpus_allowed(tsk, CPU_MASK_ALL);
228}
229
230int kthreadd(void *unused)
231{
232 /* Setup a clean context for our children to inherit. */
233 kthreadd_setup();
234 226
235 current->flags |= PF_NOFREEZE; 227 current->flags |= PF_NOFREEZE;
236 228