Skip to content
Commit 52ea806a authored by Jens Axboe's avatar Jens Axboe
Browse files

io_uring: finish waiting before flushing overflow entries



If we have overflow entries being generated after we've done the
initial flush in io_cqring_wait(), then we could be flushing them in the
main wait loop as well. If that's done after having added ourselves
to the cq_wait waitqueue, then the task state can be != TASK_RUNNING
when we enter the overflow flush.

Check for the need to overflow flush, and finish our wait cycle first
if we have to do so.

Reported-and-tested-by: default avatar <syzbot+cf6ea1d6bb30a4ce10b2@syzkaller.appspotmail.com>
Link: https://lore.kernel.org/io-uring/000000000000cb143a05f04eee15@google.com/


Signed-off-by: default avatarJens Axboe <axboe@kernel.dk>
parent 5ad70eb2
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment