summaryrefslogtreecommitdiffstats
path: root/io_uring/io-wq.c
diff options
context:
space:
mode:
authorJens Axboe <axboe@kernel.dk>2023-06-12 12:11:57 -0600
committerLinus Torvalds <torvalds@linux-foundation.org>2023-06-12 11:16:09 -0700
commitfd37b884003c7e46a0337b6e9212326d3ee1f40d (patch)
treef62028f020b991a2eed5e239cc7dcfc6a29530aa /io_uring/io-wq.c
parentace9e12da2f09faf85cd1904c14e1ab3ca49a590 (diff)
downloadlinux-fd37b884003c7e46a0337b6e9212326d3ee1f40d.tar.gz
linux-fd37b884003c7e46a0337b6e9212326d3ee1f40d.tar.bz2
linux-fd37b884003c7e46a0337b6e9212326d3ee1f40d.zip
io_uring/io-wq: don't clear PF_IO_WORKER on exit
A recent commit gated the core dumping task exit logic on current->flags remaining consistent in terms of PF_{IO,USER}_WORKER at task exit time. This exposed a problem with the io-wq handling of that, which explicitly clears PF_IO_WORKER before calling do_exit(). The reasons for this manual clear of PF_IO_WORKER is historical, where io-wq used to potentially trigger a sleep on exit. As the io-wq thread is exiting, it should not participate any further accounting. But these days we don't need to rely on current->flags anymore, so we can safely remove the PF_IO_WORKER clearing. Reported-by: Zorro Lang <zlang@redhat.com> Reported-by: Dave Chinner <david@fromorbit.com> Link: https://lore.kernel.org/all/ZIZSPyzReZkGBEFy@dread.disaster.area/ Fixes: f9010dbdce91 ("fork, vhost: Use CLONE_THREAD to fix freezer/ps regression") Signed-off-by: Jens Axboe <axboe@kernel.dk> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'io_uring/io-wq.c')
-rw-r--r--io_uring/io-wq.c3
1 files changed, 0 insertions, 3 deletions
diff --git a/io_uring/io-wq.c b/io_uring/io-wq.c
index b2715988791e..fe38eb0cbc82 100644
--- a/io_uring/io-wq.c
+++ b/io_uring/io-wq.c
@@ -221,9 +221,6 @@ static void io_worker_exit(struct io_worker *worker)
raw_spin_unlock(&wq->lock);
io_wq_dec_running(worker);
worker->flags = 0;
- preempt_disable();
- current->flags &= ~PF_IO_WORKER;
- preempt_enable();
kfree_rcu(worker, rcu);
io_worker_ref_put(wq);