Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

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>

+2 -1
+2 -1
io_uring/io_uring.c
··· 674 674 675 675 lockdep_assert_held(&ctx->uring_lock); 676 676 677 - if (__io_cqring_events(ctx) == ctx->cq_entries) 677 + /* don't abort if we're dying, entries must get freed */ 678 + if (!dying && __io_cqring_events(ctx) == ctx->cq_entries) 678 679 return; 679 680 680 681 if (ctx->flags & IORING_SETUP_CQE32)