summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPavel Begunkov <asml.silence@gmail.com>2022-06-22 00:00:36 +0100
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2022-06-29 09:04:36 +0200
commit440a9a76f5c00c8dfa4ed2c0e5b9862b68d650a2 (patch)
treeef27f0f489dbba4f4f34ee4bb75ae3b6e7830ab7
parent6ab879b3df49969d090af09732893e8cfaad1dc0 (diff)
downloadlinux-stable-440a9a76f5c00c8dfa4ed2c0e5b9862b68d650a2.tar.gz
io_uring: fix wrong arm_poll error handling
[ Upstream commit 9d2ad2947a53abf5e5e6527a9eeed50a3a4cbc72 ] 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> Signed-off-by: Sasha Levin <sashal@kernel.org>
-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 38ecea726254..e4186635aaa8 100644
--- a/fs/io_uring.c
+++ b/fs/io_uring.c
@@ -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;