Skip to content

Commit fd37b88

Browse files
axboetorvalds
authored andcommitted
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 <[email protected]> Reported-by: Dave Chinner <[email protected]> Link: https://lore.kernel.org/all/[email protected]/ Fixes: f9010db ("fork, vhost: Use CLONE_THREAD to fix freezer/ps regression") Signed-off-by: Jens Axboe <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
1 parent ace9e12 commit fd37b88

File tree

1 file changed

+0
-3
lines changed

1 file changed

+0
-3
lines changed

io_uring/io-wq.c

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -221,9 +221,6 @@ static void io_worker_exit(struct io_worker *worker)
221221
raw_spin_unlock(&wq->lock);
222222
io_wq_dec_running(worker);
223223
worker->flags = 0;
224-
preempt_disable();
225-
current->flags &= ~PF_IO_WORKER;
226-
preempt_enable();
227224

228225
kfree_rcu(worker, rcu);
229226
io_worker_ref_put(wq);

0 commit comments

Comments
 (0)