This is a note to let you know that I've just added the patch titled io_uring: fix wrong arm_poll error handling to the 5.15-stable tree which can be found at: http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary The filename of the patch is: io_uring-fix-wrong-arm_poll-error-handling.patch and it can be found in the queue-5.15 subdirectory. If you, or anyone else, feels it should not be added to the stable tree, please let <stable@xxxxxxxxxxxxxxx> know about it. >From foo@baz Thu Sep 1 11:59:31 AM CEST 2022 From: Pavel Begunkov <asml.silence@xxxxxxxxx> Date: Mon, 29 Aug 2022 14:30:23 +0100 Subject: io_uring: fix wrong arm_poll error handling To: stable@xxxxxxxxxxxxxxx Cc: Jens Axboe <axboe@xxxxxxxxx>, asml.silence@xxxxxxxxx Message-ID: <cd4e6937d06fd243778b5a0eece6e37b9d058900.1661594698.git.asml.silence@xxxxxxxxx> From: Pavel Begunkov <asml.silence@xxxxxxxxx> [ upstream commmit 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@xxxxxxxxx> Link: https://lore.kernel.org/r/a6c84ef4182c6962380aebe11b35bdcb25b0ccfb.1655852245.git.asml.silence@xxxxxxxxx Signed-off-by: Jens Axboe <axboe@xxxxxxxxx> [pavel: backport] Signed-off-by: Pavel Begunkov <asml.silence@xxxxxxxxx> Signed-off-by: Greg Kroah-Hartman <gregkh@xxxxxxxxxxxxxxxxxxx> --- fs/io_uring.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) --- a/fs/io_uring.c +++ b/fs/io_uring.c @@ -5627,8 +5627,10 @@ static int __io_arm_poll_handler(struct if (mask) { /* can't multishot if failed, just queue the event we've got */ - if (unlikely(ipt->error || !ipt->nr_entries)) + if (unlikely(ipt->error || !ipt->nr_entries)) { poll->events |= EPOLLONESHOT; + ipt->error = 0; + } __io_poll_execute(req, mask); return 0; } Patches currently in stable-queue which might be from asml.silence@xxxxxxxxx are queue-5.15/io_uring-fix-wrong-arm_poll-error-handling.patch queue-5.15/io_uring-poll-rework.patch queue-5.15/io_uring-remove-unused-function-req_ref_put.patch queue-5.15/io_uring-fail-links-when-poll-fails.patch queue-5.15/io_uring-inline-io_poll_complete.patch queue-5.15/io_uring-bump-poll-refs-to-full-31-bits.patch queue-5.15/io_uring-clean-cqe-filling-functions.patch queue-5.15/io_uring-fix-uaf-due-to-missing-pollfree-handling.patch queue-5.15/io_uring-correct-fill-events-helpers-types.patch queue-5.15/io_uring-refactor-poll-update.patch queue-5.15/io_uring-kill-poll-linking-optimisation.patch queue-5.15/io_uring-remove-poll-entry-from-list-when-canceling-all.patch queue-5.15/io_uring-move-common-poll-bits.patch