mirror of
https://github.com/raspberrypi/linux.git
synced 2025-12-08 19:09:57 +00:00
io_uring: disable multishot poll for double poll add cases
The re-add handling isn't correct for the multi wait case, so let's just disable it for now explicitly until we can get that sorted out. This just turns it into a one-shot request. Since we pass back whether or not a poll request terminates in multishot mode on completion, this should not break properly behaving applications that check for IORING_CQE_F_MORE on completion. Signed-off-by: Jens Axboe <axboe@kernel.dk>
This commit is contained in:
@@ -4976,6 +4976,12 @@ static void __io_queue_proc(struct io_poll_iocb *poll, struct io_poll_table *pt,
|
||||
pt->error = -EINVAL;
|
||||
return;
|
||||
}
|
||||
/*
|
||||
* Can't handle multishot for double wait for now, turn it
|
||||
* into one-shot mode.
|
||||
*/
|
||||
if (!(req->poll.events & EPOLLONESHOT))
|
||||
req->poll.events |= EPOLLONESHOT;
|
||||
/* double add on the same waitqueue head, ignore */
|
||||
if (poll->head == head)
|
||||
return;
|
||||
|
||||
Reference in New Issue
Block a user