/* Clone this thread. Note that we don't pass the clone syscall's
second argument -- it's ignored for calls from kernel mode (the
child's SP is always set to the top of the kernel stack). */
- arg0 = flags | CLONE_VM;
+ arg0 = flags | CLONE_VM | CLONE_KTHREAD;
syscall = __NR_clone;
asm volatile ("trap " SYSCALL_SHORT_TRAP
: "=r" (ret), "=r" (syscall)