Skip to content

Commit

Permalink
io_uring: fix wrong arm_poll error handling
Browse files Browse the repository at this point in the history
[ Upstream commit 9d2ad29 ]

Leaving ip.error set when a request was punted to task_work execution is
problematic, don't forget to clear it.

Fixes: aa43477 ("io_uring: poll rework")
Signed-off-by: Pavel Begunkov <asml.silence@gmail.com>
Link: https://lore.kernel.org/r/a6c84ef4182c6962380aebe11b35bdcb25b0ccfb.1655852245.git.asml.silence@gmail.com
Signed-off-by: Jens Axboe <axboe@kernel.dk>
Signed-off-by: Sasha Levin <sashal@kernel.org>
  • Loading branch information
isilence authored and gregkh committed Jun 29, 2022
1 parent 6ab879b commit 440a9a7
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions fs/io_uring.c
Expand Up @@ -6178,6 +6178,7 @@ static int __io_arm_poll_handler(struct io_kiocb *req,
if (unlikely(ipt->error || !ipt->nr_entries)) {
poll->events |= EPOLLONESHOT;
req->apoll_events |= EPOLLONESHOT;
ipt->error = 0;
}
__io_poll_execute(req, mask, poll->events);
return 0;
Expand Down

0 comments on commit 440a9a7

Please sign in to comment.