mirror of
https://github.com/hardkernel/linux.git
synced 2026-06-07 03:15:31 +09:00
io_uring: fail links when poll fails
[ upstream commmitc487a5ad48] Don't forget to cancel all linked requests of poll request when __io_arm_poll_handler() failed. Fixes:aa43477b04("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> [pavel: backport] Signed-off-by: Pavel Begunkov <asml.silence@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
committed by
Greg Kroah-Hartman
parent
c41e79a0c4
commit
6c7259c837
@@ -5844,6 +5844,8 @@ static int io_poll_add(struct io_kiocb *req, unsigned int issue_flags)
|
||||
ipt.pt._qproc = io_poll_queue_proc;
|
||||
|
||||
ret = __io_arm_poll_handler(req, &req->poll, &ipt, poll->events);
|
||||
if (!ret && ipt.error)
|
||||
req_set_fail(req);
|
||||
ret = ret ?: ipt.error;
|
||||
if (ret)
|
||||
__io_req_complete(req, issue_flags, ret, 0);
|
||||
|
||||
Reference in New Issue
Block a user