Skip to content

Commit c487a5a

Browse files
isilenceaxboe
authored andcommitted
io_uring: fail links when poll fails
Don't forget to cancel all linked requests of poll request when __io_arm_poll_handler() failed. Fixes: aa43477 ("io_uring: poll rework") Signed-off-by: Pavel Begunkov <asml.silence@gmail.com> Link: https://lore.kernel.org/r/a78aad962460f9fdfe4aa4c0b62425c88f9415bc.1655852245.git.asml.silence@gmail.com Signed-off-by: Jens Axboe <axboe@kernel.dk>
1 parent aacf2f9 commit c487a5a

1 file changed

Lines changed: 2 additions & 0 deletions

File tree

fs/io_uring.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7405,6 +7405,8 @@ static int io_poll_add(struct io_kiocb *req, unsigned int issue_flags)
74057405
ipt.pt._qproc = io_poll_queue_proc;
74067406

74077407
ret = __io_arm_poll_handler(req, &req->poll, &ipt, poll->events);
7408+
if (!ret && ipt.error)
7409+
req_set_fail(req);
74087410
ret = ret ?: ipt.error;
74097411
if (ret)
74107412
__io_req_complete(req, issue_flags, ret, 0);

0 commit comments

Comments
 (0)