Commit 95f184d0 authored by Linus Torvalds's avatar Linus Torvalds

Merge tag 'io_uring-6.2-2023-01-21' of git://git.kernel.dk/linux

Pull another io_uring fix from Jens Axboe:
 "Just a single fix for a regression that happened in this release due
  to a poll change. Normally I would've just deferred it to next week,
  but since the original fix got picked up by stable, I think it's
  better to just send this one off separately.

  The issue is around the poll race fix, and how it mistakenly also got
  applied to multishot polling. Those don't need the race fix, and we
  should not be doing any reissues for that case. Exhaustive test cases
  were written and committed to the liburing regression suite for the
  reported issue, and additions for similar issues"

* tag 'io_uring-6.2-2023-01-21' of git://git.kernel.dk/linux:
  io_uring/poll: don't reissue in case of poll race on multishot request
parents f6714402 8caa03f1
......@@ -283,8 +283,12 @@ static int io_poll_check_events(struct io_kiocb *req, bool *locked)
* to the waitqueue, so if we get nothing back, we
* should be safe and attempt a reissue.
*/
if (unlikely(!req->cqe.res))
if (unlikely(!req->cqe.res)) {
/* Multishot armed need not reissue */
if (!(req->apoll_events & EPOLLONESHOT))
continue;
return IOU_POLL_REISSUE;
}
}
if (req->apoll_events & EPOLLONESHOT)
return IOU_POLL_DONE;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment