io_uring: ensure overflow entries are dropped when ring is exiting
authorJens Axboe <axboe@kernel.dk>
Fri, 12 Apr 2024 19:16:20 +0000 (13:16 -0600)
committerJens Axboe <axboe@kernel.dk>
Mon, 15 Apr 2024 14:10:27 +0000 (08:10 -0600)
commit686b56cbeedc9f4c72f9bb781918194a9a3e8334
tree8c5cab653001baeef0064e514c7345c5c8f14a5f
parent4d0f4a5413490391c6cd16407a0f71b51700a68a
io_uring: ensure overflow entries are dropped when ring is exiting

A previous consolidation cleanup missed handling the case where the ring
is dying, and __io_cqring_overflow_flush() doesn't flush entries if the
CQ ring is already full. This is fine for the normal CQE overflow
flushing, but if the ring is going away, we need to flush everything,
even if it means simply freeing the overflown entries.

Fixes: 6c948ec44b29 ("io_uring: consolidate overflow flushing")
Signed-off-by: Jens Axboe <axboe@kernel.dk>
io_uring/io_uring.c