Skip to content

Commit

Permalink
io_uring: fix NULL mm in io_poll_task_func()
Browse files Browse the repository at this point in the history
io_poll_task_func() hand-coded link submission forgetting to set
TASK_RUNNING, acquire mm, etc. Call existing helper for that,
i.e. __io_req_task_submit().

Signed-off-by: Pavel Begunkov <asml.silence@gmail.com>
Signed-off-by: Jens Axboe <axboe@kernel.dk>
  • Loading branch information
Pavel Begunkov authored and Jens Axboe committed Jun 30, 2020
1 parent cf2f542 commit ea1164e
Showing 1 changed file with 2 additions and 7 deletions.
9 changes: 2 additions & 7 deletions fs/io_uring.c
Original file line number Diff line number Diff line change
Expand Up @@ -4518,13 +4518,8 @@ static void io_poll_task_func(struct callback_head *cb)
struct io_kiocb *nxt = NULL;

io_poll_task_handler(req, &nxt);
if (nxt) {
struct io_ring_ctx *ctx = nxt->ctx;

mutex_lock(&ctx->uring_lock);
__io_queue_sqe(nxt, NULL, NULL);
mutex_unlock(&ctx->uring_lock);
}
if (nxt)
__io_req_task_submit(nxt);
}

static int io_poll_double_wake(struct wait_queue_entry *wait, unsigned mode,
Expand Down

0 comments on commit ea1164e

Please sign in to comment.