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

Changed files
+5 -1
io_uring
+5 -1
io_uring/poll.c
··· 283 283 * to the waitqueue, so if we get nothing back, we 284 284 * should be safe and attempt a reissue. 285 285 */ 286 - if (unlikely(!req->cqe.res)) 286 + if (unlikely(!req->cqe.res)) { 287 + /* Multishot armed need not reissue */ 288 + if (!(req->apoll_events & EPOLLONESHOT)) 289 + continue; 287 290 return IOU_POLL_REISSUE; 291 + } 288 292 } 289 293 if (req->apoll_events & EPOLLONESHOT) 290 294 return IOU_POLL_DONE;