File tree Expand file tree Collapse file tree 1 file changed +2
-7
lines changed Expand file tree Collapse file tree 1 file changed +2
-7
lines changed Original file line number Diff line number Diff line change @@ -2235,12 +2235,6 @@ static inline unsigned int io_put_rw_kbuf(struct io_kiocb *req)
2235
2235
2236
2236
static inline bool io_run_task_work (void )
2237
2237
{
2238
- /*
2239
- * Not safe to run on exiting task, and the task_work handling will
2240
- * not add work to such a task.
2241
- */
2242
- if (unlikely (current -> flags & PF_EXITING ))
2243
- return false;
2244
2238
if (current -> task_works ) {
2245
2239
__set_current_state (TASK_RUNNING );
2246
2240
task_work_run ();
@@ -9020,7 +9014,8 @@ static void io_uring_try_cancel_requests(struct io_ring_ctx *ctx,
9020
9014
ret |= io_cancel_defer_files (ctx , task , cancel_all );
9021
9015
ret |= io_poll_remove_all (ctx , task , cancel_all );
9022
9016
ret |= io_kill_timeouts (ctx , task , cancel_all );
9023
- ret |= io_run_task_work ();
9017
+ if (task )
9018
+ ret |= io_run_task_work ();
9024
9019
ret |= io_run_ctx_fallback (ctx );
9025
9020
if (!ret )
9026
9021
break ;
You can’t perform that action at this time.
0 commit comments