io_uring/fdinfo: only print ->sq_array[] if it's there
Jens Axboe
maintainerPATCH 1/1 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 [email protected]
Fixes 2af89abda7d9 ("io_uring: add option to remove SQ indirection")
Signed-off-by Jens Axboe <[email protected]>
---
io_uring/fdinfo.c +2 -0
@@ -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 ;
Signature · 1 line
Jens Axboe
Quoted 15 lines · Jens Axboe
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 [email protected]Fixes 2af89abda7d9 ("io_uring: add option to remove SQ indirection")Signed-off-by Jens Axboe <[email protected]>---
io_uring/fdinfo.c +0
-0
io_uring/fdinfo.c __cold void io_uring_show_fdinfo(struct seq_file *m, struct file *f) · line 100
Quoted 8 lines
io_uring/fdinfo.c +2
-0@@ -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 ;
Reviewed-by Gabriel Krisman Bertazi <[email protected]>
Signature · 1 line
Gabriel Krisman Bertazi