File tree Expand file tree Collapse file tree 1 file changed +9
-0
lines changed Expand file tree Collapse file tree 1 file changed +9
-0
lines changed Original file line number Diff line number Diff line change @@ -890,6 +890,7 @@ static int __io_sqe_files_update(struct io_ring_ctx *ctx,
890890 struct io_uring_files_update * ip ,
891891 unsigned nr_args );
892892static int io_grab_files (struct io_kiocb * req );
893+ static void io_complete_rw_common (struct kiocb * kiocb , long res );
893894static void io_cleanup_req (struct io_kiocb * req );
894895static int io_file_get (struct io_submit_state * state , struct io_kiocb * req ,
895896 int fd , struct file * * out_file , bool fixed );
@@ -1749,6 +1750,14 @@ static void io_iopoll_queue(struct list_head *again)
17491750 do {
17501751 req = list_first_entry (again , struct io_kiocb , list );
17511752 list_del (& req -> list );
1753+
1754+ /* shouldn't happen unless io_uring is dying, cancel reqs */
1755+ if (unlikely (!current -> mm )) {
1756+ io_complete_rw_common (& req -> rw .kiocb , - EAGAIN );
1757+ io_put_req (req );
1758+ continue ;
1759+ }
1760+
17521761 refcount_inc (& req -> refs );
17531762 io_queue_async_work (req );
17541763 } while (!list_empty (again ));
You can’t perform that action at this time.
0 commit comments