aboutsummaryrefslogtreecommitdiffstats
path: root/arch/i386/kernel/process.c
diff options
context:
space:
mode:
Diffstat (limited to 'arch/i386/kernel/process.c')
-rw-r--r--arch/i386/kernel/process.c6
1 files changed, 1 insertions, 5 deletions
diff --git a/arch/i386/kernel/process.c b/arch/i386/kernel/process.c
index 57d375900afb..1e1fa3e391a3 100644
--- a/arch/i386/kernel/process.c
+++ b/arch/i386/kernel/process.c
@@ -336,7 +336,6 @@ extern void kernel_thread_helper(void);
336int kernel_thread(int (*fn)(void *), void * arg, unsigned long flags) 336int kernel_thread(int (*fn)(void *), void * arg, unsigned long flags)
337{ 337{
338 struct pt_regs regs; 338 struct pt_regs regs;
339 int err;
340 339
341 memset(&regs, 0, sizeof(regs)); 340 memset(&regs, 0, sizeof(regs));
342 341
@@ -351,10 +350,7 @@ int kernel_thread(int (*fn)(void *), void * arg, unsigned long flags)
351 regs.eflags = X86_EFLAGS_IF | X86_EFLAGS_SF | X86_EFLAGS_PF | 0x2; 350 regs.eflags = X86_EFLAGS_IF | X86_EFLAGS_SF | X86_EFLAGS_PF | 0x2;
352 351
353 /* Ok, create the new process.. */ 352 /* Ok, create the new process.. */
354 err = do_fork(flags | CLONE_VM | CLONE_UNTRACED, 0, &regs, 0, NULL, NULL); 353 return do_fork(flags | CLONE_VM | CLONE_UNTRACED, 0, &regs, 0, NULL, NULL);
355 if (err == 0) /* terminate kernel stack */
356 task_pt_regs(current)->eip = 0;
357 return err;
358} 354}
359EXPORT_SYMBOL(kernel_thread); 355EXPORT_SYMBOL(kernel_thread);
360 356