Merge tag 'io_uring-worker.v3-2021-02-25' of git://git.kernel.dk/linux-block
[linux-block.git] / arch / riscv / kernel / process.c
index 19f4688f2f36704701cc357b31d7886257effafe..6f728e731bedf56020516cbdc0076e53ce518b85 100644 (file)
@@ -124,7 +124,7 @@ int copy_thread(unsigned long clone_flags, unsigned long usp, unsigned long arg,
        struct pt_regs *childregs = task_pt_regs(p);
 
        /* p->thread holds context to be restored by __switch_to() */
-       if (unlikely(p->flags & PF_KTHREAD)) {
+       if (unlikely(p->flags & (PF_KTHREAD | PF_IO_WORKER))) {
                /* Kernel thread */
                memset(childregs, 0, sizeof(struct pt_regs));
                childregs->gp = gp_in_global;