Skip to content

Commit 95f184d

Browse files
committed
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
2 parents f671440 + 8caa03f commit 95f184d

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

io_uring/poll.c

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -283,8 +283,12 @@ static int io_poll_check_events(struct io_kiocb *req, bool *locked)
283283
* to the waitqueue, so if we get nothing back, we
284284
* should be safe and attempt a reissue.
285285
*/
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;
287290
return IOU_POLL_REISSUE;
291+
}
288292
}
289293
if (req->apoll_events & EPOLLONESHOT)
290294
return IOU_POLL_DONE;

0 commit comments

Comments
 (0)