It is a reasonable expectation from a function to leave the task struct in a clean state. During io_uring_try_cancel_requests TIF_NOTIFY_SIGNAL can be set. Make sure that it is cleared by replacing calls to io_run_task_work with tracehook_notify_signal Signed-off-by: Olivier Langlois <olivier@xxxxxxxxxxxxxx> --- fs/io_uring.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/fs/io_uring.c b/fs/io_uring.c index a2e20a6fbfed..a9c83a5fc9f1 100644 --- a/fs/io_uring.c +++ b/fs/io_uring.c @@ -9032,7 +9032,7 @@ static void io_uring_try_cancel_requests(struct io_ring_ctx *ctx, ret |= io_poll_remove_all(ctx, task, cancel_all); ret |= io_kill_timeouts(ctx, task, cancel_all); if (task) - ret |= io_run_task_work(); + ret |= tracehook_notify_signal(); if (!ret) break; cond_resched(); -- 2.32.0