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 @@ -858,6 +858,7 @@ static int __io_sqe_files_update(struct io_ring_ctx *ctx,
858
858
struct io_uring_files_update * ip ,
859
859
unsigned nr_args );
860
860
static int io_grab_files (struct io_kiocb * req );
861
+ static void io_complete_rw_common (struct kiocb * kiocb , long res );
861
862
static void io_cleanup_req (struct io_kiocb * req );
862
863
static int io_file_get (struct io_submit_state * state , struct io_kiocb * req ,
863
864
int fd , struct file * * out_file , bool fixed );
@@ -1697,6 +1698,14 @@ static void io_iopoll_queue(struct list_head *again)
1697
1698
do {
1698
1699
req = list_first_entry (again , struct io_kiocb , list );
1699
1700
list_del (& req -> list );
1701
+
1702
+ /* shouldn't happen unless io_uring is dying, cancel reqs */
1703
+ if (unlikely (!current -> mm )) {
1704
+ io_complete_rw_common (& req -> rw .kiocb , - EAGAIN );
1705
+ io_put_req (req );
1706
+ continue ;
1707
+ }
1708
+
1700
1709
refcount_inc (& req -> refs );
1701
1710
io_queue_async_work (req );
1702
1711
} while (!list_empty (again ));
You can’t perform that action at this time.
0 commit comments