Skip to content

Commit ebe1002

Browse files
committed
io_uring: don't cancel all work on process exit
If we're sharing the ring across forks, then one process exiting means that we cancel ALL work and prevent future work. This is overly restrictive. As long as we cancel the work associated with the files from the current task, it's safe to let others persist. Normal fd close on exit will still wait (and cancel) pending work. Fixes: fcb323c ("io_uring: io_uring: add support for async work inheriting files") Reported-by: Andres Freund <[email protected]> Signed-off-by: Jens Axboe <[email protected]>
1 parent 73e08e7 commit ebe1002

File tree

1 file changed

+0
-4
lines changed

1 file changed

+0
-4
lines changed

fs/io_uring.c

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5044,10 +5044,6 @@ static int io_uring_flush(struct file *file, void *data)
50445044
struct io_ring_ctx *ctx = file->private_data;
50455045

50465046
io_uring_cancel_files(ctx, data);
5047-
if (fatal_signal_pending(current) || (current->flags & PF_EXITING)) {
5048-
io_cqring_overflow_flush(ctx, true);
5049-
io_wq_cancel_all(ctx->io_wq);
5050-
}
50515047
return 0;
50525048
}
50535049

0 commit comments

Comments
 (0)