aboutsummaryrefslogtreecommitdiffstats
path: root/io_uring
diff options
context:
space:
mode:
authorJens Axboe <axboe@kernel.dk>2023-09-01 13:59:19 -0600
committerJens Axboe <axboe@kernel.dk>2023-09-01 15:08:29 -0600
commit32f5dea040ee6e3cc30ac52d23f1674fd5110d03 (patch)
treed3b91948c90923dfd6b74e6ce3b4e8789378723c /io_uring
parentb484a40dc1f16edb58e5430105a021e1916e6f27 (diff)
downloadlinux-32f5dea040ee6e3cc30ac52d23f1674fd5110d03.tar.gz
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: 2af89abda7d9 ("io_uring: add option to remove SQ indirection") Reviewed-by: Gabriel Krisman Bertazi <krisman@suse.de> Signed-off-by: Jens Axboe <axboe@kernel.dk>
Diffstat (limited to 'io_uring')
-rw-r--r--io_uring/fdinfo.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/io_uring/fdinfo.c b/io_uring/fdinfo.c
index 300455b4bc122b..c5367887541642 100644
--- a/io_uring/fdinfo.c
+++ b/io_uring/fdinfo.c
@@ -93,6 +93,8 @@ __cold void io_uring_show_fdinfo(struct seq_file *m, struct file *f)
struct io_uring_sqe *sqe;
unsigned int sq_idx;
+ if (ctx->flags & IORING_SETUP_NO_SQARRAY)
+ break;
sq_idx = READ_ONCE(ctx->sq_array[entry & sq_mask]);
if (sq_idx > sq_mask)
continue;