Skip to content

Commit 32f5dea

Browse files
committed
io_uring/fdinfo: only print ->sq_array[] if it's there
If a ring is setup with IORING_SETUP_NO_SQARRAY, then we don't have the SQ array. Don't try to dump info from it through fdinfo if that is the case. Reported-by: syzbot+216e2ea6e0bf4a0acdd7@syzkaller.appspotmail.com Fixes: 2af89ab ("io_uring: add option to remove SQ indirection") Reviewed-by: Gabriel Krisman Bertazi <krisman@suse.de> Signed-off-by: Jens Axboe <axboe@kernel.dk>
1 parent b484a40 commit 32f5dea

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

io_uring/fdinfo.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -93,6 +93,8 @@ __cold void io_uring_show_fdinfo(struct seq_file *m, struct file *f)
9393
struct io_uring_sqe *sqe;
9494
unsigned int sq_idx;
9595

96+
if (ctx->flags & IORING_SETUP_NO_SQARRAY)
97+
break;
9698
sq_idx = READ_ONCE(ctx->sq_array[entry & sq_mask]);
9799
if (sq_idx > sq_mask)
98100
continue;

0 commit comments

Comments
 (0)