summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPavel Begunkov <asml.silence@gmail.com>2022-06-22 01:00:36 +0200
committerJens Axboe <axboe@kernel.dk>2022-06-22 01:24:37 +0200
commit9d2ad2947a53abf5e5e6527a9eeed50a3a4cbc72 (patch)
tree2d5dc366b8f8ed4b57b647a6916fe99972a2c016
parentio_uring: fail links when poll fails (diff)
downloadlinux-9d2ad2947a53abf5e5e6527a9eeed50a3a4cbc72.tar.xz
linux-9d2ad2947a53abf5e5e6527a9eeed50a3a4cbc72.zip
io_uring: fix wrong arm_poll error handling
Leaving ip.error set when a request was punted to task_work execution is problematic, don't forget to clear it. Fixes: aa43477b04025 ("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>
-rw-r--r--fs/io_uring.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/fs/io_uring.c b/fs/io_uring.c
index d5ea3c6167b5..cb719a53b8bd 100644
--- a/fs/io_uring.c
+++ b/fs/io_uring.c
@@ -7145,6 +7145,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;