Skip to content

Complete setup before calling wake_up_new_task()

Stefan Metzmacher io-uring 3 versions – In review

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v3 Latest6 patches 3 repliesIn review
  2. v25 patches 3 repliesSuperseded
  3. v1 RFC10 patches 3 repliesSuperseded

Changes in v3 from the cover letter

- rebased on for-5.13/io_uring.
- I dropped this:
fs/proc: hide PF_IO_WORKER in get_task_cmdline()
- I added:
set_task_comm() overflow checks

Patches in v3 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/6kernel: always initialize task->pf_io_worker to NULLkernel/fork.c+1 -00 replies
2/6io_uring: io_sq_thread() no longer needs to reset current->pf_io_workerfs/io_uring.c+0 -10 replies
3/6io-wq: call set_task_comm() before wake_up_new_task()fs/io-wq.c+4 -40 replies
4/6io_uring: complete sq_thread setup before calling wake_up_new_task()fs/io_uring.c+11 -100 replies
5/6io-wq: warn about future set_task_comm() overflows.fs/io-wq.c+13 -11 reply
6/6io_uring: warn about future set_task_comm() overflows.fs/io_uring.c+13 -10 replies

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v3 yet.

Read the v3 thread

Cover letter [PATCH v3 0/6] Complete setup before calling wake_up_new_task()

Hi,

now that we have an explicit wake_up_new_task() in order to start the result from create_io_thread(), we should set things up before calling wake_up_new_task().

Changes in v3:
- rebased on for-5.13/io_uring.
- I dropped this:
fs/proc: hide PF_IO_WORKER in get_task_cmdline()
- I added:
set_task_comm() overflow checks

Changes in v2:

- I dropped/deferred these changes:
- We no longer allow a userspace process to change

    /proc/<pid>/[task/<tid>]/comm

- We dynamically generate comm names (up to 63 chars) via io_wq_worker_comm(), similar to wq_worker_comm()

Stefan Metzmacher (6):
kernel: always initialize task->pf_io_worker to NULL
io_uring: io_sq_thread() no longer needs to reset

    current->pf_io_worker

io-wq: call set_task_comm() before wake_up_new_task()
io_uring: complete sq_thread setup before calling wake_up_new_task()
io-wq: warn about future set_task_comm() overflows.
io_uring: warn about future set_task_comm() overflows.

 fs/io-wq.c    | 20 ++++++++++++++++----
 fs/io_uring.c | 34 +++++++++++++++++++++++-----------
 kernel/fork.c |  1 +
 3 files changed, 40 insertions(+), 15 deletions(-)
Signature · 1 line
2.25.1