projects
/
linux.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
c41e79a
)
io_uring: fail links when poll fails
author
Pavel Begunkov
<asml.silence@gmail.com>
Mon, 29 Aug 2022 13:30:22 +0000
(14:30 +0100)
committer
Greg Kroah-Hartman
<gregkh@linuxfoundation.org>
Mon, 5 Sep 2022 08:30:05 +0000
(10:30 +0200)
[ upstream commmit
c487a5ad48831afa6784b368ec40d0ee50f2fe1b
]
Don't forget to cancel all linked requests of poll request when
__io_arm_poll_handler() failed.
Fixes: aa43477b04025 ("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>
fs/io_uring.c
patch
|
blob
|
history
diff --git
a/fs/io_uring.c
b/fs/io_uring.c
index 2c8cc3180fb48c2a11da643aa2da67294aa27f78..2eb33d0fa55043790d0ed26e1db07cc316ffb2e0 100644
(file)
--- a/
fs/io_uring.c
+++ b/
fs/io_uring.c
@@
-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);