Skip to content

Commit

Permalink
Merge tag 'io_uring-6.3-2023-04-14' of git://git.kernel.dk/linux
Browse files Browse the repository at this point in the history
Pull io_uring fix from Jens Axboe:
 "Just a small tweak to when task_work needs redirection, marked for
  stable as well"

* tag 'io_uring-6.3-2023-04-14' of git://git.kernel.dk/linux:
  io_uring: complete request via task work in case of DEFER_TASKRUN
  • Loading branch information
Linus Torvalds committed Apr 15, 2023
2 parents 7a934f4 + 860e1c7 commit 1c6492d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion io_uring/io_uring.c
Original file line number Diff line number Diff line change
Expand Up @@ -998,7 +998,7 @@ static void __io_req_complete_post(struct io_kiocb *req)

void io_req_complete_post(struct io_kiocb *req, unsigned issue_flags)
{
if (req->ctx->task_complete && (issue_flags & IO_URING_F_IOWQ)) {
if (req->ctx->task_complete && req->ctx->submitter_task != current) {
req->io_task_work.func = io_req_task_complete;
io_req_task_work_add(req);
} else if (!(issue_flags & IO_URING_F_UNLOCKED) ||
Expand Down

0 comments on commit 1c6492d

Please sign in to comment.