]> Git Repo - linux.git/commitdiff
Merge tag 'io_uring-5.12-2021-03-27' of git://git.kernel.dk/linux-block
authorLinus Torvalds <[email protected]>
Sun, 28 Mar 2021 18:42:05 +0000 (11:42 -0700)
committerLinus Torvalds <[email protected]>
Sun, 28 Mar 2021 18:42:05 +0000 (11:42 -0700)
Pull io_uring fixes from Jens Axboe:

 - Use thread info versions of flag testing, as discussed last week.

 - The series enabling PF_IO_WORKER to just take signals, instead of
   needing to special case that they do not in a bunch of places. Ends
   up being pretty trivial to do, and then we can revert all the special
   casing we're currently doing.

 - Kill dead pointer assignment

 - Fix hashed part of async work queue trace

 - Fix sign extension issue for IORING_OP_PROVIDE_BUFFERS

 - Fix a link completion ordering regression in this merge window

 - Cancellation fixes

* tag 'io_uring-5.12-2021-03-27' of git://git.kernel.dk/linux-block:
  io_uring: remove unsued assignment to pointer io
  io_uring: don't cancel extra on files match
  io_uring: don't cancel-track common timeouts
  io_uring: do post-completion chore on t-out cancel
  io_uring: fix timeout cancel return code
  Revert "signal: don't allow STOP on PF_IO_WORKER threads"
  Revert "kernel: freezer should treat PF_IO_WORKER like PF_KTHREAD for freezing"
  Revert "kernel: treat PF_IO_WORKER like PF_KTHREAD for ptrace/signals"
  Revert "signal: don't allow sending any signals to PF_IO_WORKER threads"
  kernel: stop masking signals in create_io_thread()
  io_uring: handle signals for IO threads like a normal thread
  kernel: don't call do_exit() for PF_IO_WORKER threads
  io_uring: maintain CQE order of a failed link
  io-wq: fix race around pending work on teardown
  io_uring: do ctx sqd ejection in a clear context
  io_uring: fix provide_buffers sign extension
  io_uring: don't skip file_end_write() on reissue
  io_uring: correct io_queue_async_work() traces
  io_uring: don't use {test,clear}_tsk_thread_flag() for current

1  2 
kernel/fork.c

diff --combined kernel/fork.c
index 54cc905e5fe095d0081ec943ac2a16e487f2235b,ddaa1522707138b6e2bad2ab574bd6c468001907..426cd0c51f9ebb7d903d14c7e220a018ac38e27b
@@@ -994,13 -994,6 +994,13 @@@ static void mm_init_owner(struct mm_str
  #endif
  }
  
 +static void mm_init_pasid(struct mm_struct *mm)
 +{
 +#ifdef CONFIG_IOMMU_SUPPORT
 +      mm->pasid = INIT_PASID;
 +#endif
 +}
 +
  static void mm_init_uprobes_state(struct mm_struct *mm)
  {
  #ifdef CONFIG_UPROBES
@@@ -1031,7 -1024,6 +1031,7 @@@ static struct mm_struct *mm_init(struc
        mm_init_cpumask(mm);
        mm_init_aio(mm);
        mm_init_owner(mm, p);
 +      mm_init_pasid(mm);
        RCU_INIT_POINTER(mm->exe_file, NULL);
        mmu_notifier_subscriptions_init(mm);
        init_tlb_flush_pending(mm);
@@@ -1948,8 -1940,14 +1948,14 @@@ static __latent_entropy struct task_str
        p = dup_task_struct(current, node);
        if (!p)
                goto fork_out;
-       if (args->io_thread)
+       if (args->io_thread) {
+               /*
+                * Mark us an IO worker, and block any signal that isn't
+                * fatal or STOP
+                */
                p->flags |= PF_IO_WORKER;
+               siginitsetinv(&p->blocked, sigmask(SIGKILL)|sigmask(SIGSTOP));
+       }
  
        /*
         * This _must_ happen before we call free_task(), i.e. before we jump
@@@ -2438,14 -2436,8 +2444,8 @@@ struct task_struct *create_io_thread(in
                .stack_size     = (unsigned long)arg,
                .io_thread      = 1,
        };
-       struct task_struct *tsk;
  
-       tsk = copy_process(NULL, 0, node, &args);
-       if (!IS_ERR(tsk)) {
-               sigfillset(&tsk->blocked);
-               sigdelsetmask(&tsk->blocked, sigmask(SIGKILL));
-       }
-       return tsk;
+       return copy_process(NULL, 0, node, &args);
  }
  
  /*
This page took 0.0712 seconds and 4 git commands to generate.