Skip to content

Commit b59efde

Browse files
committed
io_uring/fdinfo: fix SQE_MIXED SQE displaying
When displaying pending SQEs for a MIXED ring, each 128-byte SQE increments sq_head to skip the second slot, but the loop counter is not adjusted. This can cause the loop to read past sq_tail by one entry for each 128-byte SQE encountered, displaying SQEs that haven't been made consumable yet by the application. Match the kernel's own consumption logic in io_init_req() which decrements what's left when consuming the extra slot. Fixes: 1cba30b ("io_uring: add support for IORING_SETUP_SQE_MIXED") Signed-off-by: Jens Axboe <axboe@kernel.dk>
1 parent 418eab7 commit b59efde

1 file changed

Lines changed: 1 addition & 0 deletions

File tree

io_uring/fdinfo.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -125,6 +125,7 @@ static void __io_uring_show_fdinfo(struct io_ring_ctx *ctx, struct seq_file *m)
125125
sq_idx);
126126
break;
127127
}
128+
i++;
128129
sqe128 = true;
129130
}
130131
seq_printf(m, "%5u: opcode:%s, fd:%d, flags:%x, off:%llu, "

0 commit comments

Comments
 (0)