From: Gabriel Krisman Bertazi <krisman@suse.de>
To: Jens Axboe <axboe@kernel.dk>
Cc: io-uring <io-uring@vger.kernel.org>,
Pavel Begunkov <asml.silence@gmail.com>
Subject: Re: [PATCH] io_uring/fdinfo: only print ->sq_array[] if it's there
Date: Fri, 01 Sep 2023 16:58:17 -0400 [thread overview]
Message-ID: <87edjhbogm.fsf@suse.de> (raw)
In-Reply-To: <6a715702-69e6-48a0-b278-5624d0c5c58d@kernel.dk> (Jens Axboe's message of "Fri, 1 Sep 2023 14:01:05 -0600")
Jens Axboe <axboe@kernel.dk> writes:
> 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")
> Signed-off-by: Jens Axboe <axboe@kernel.dk>
>
> ---
>
> diff --git a/io_uring/fdinfo.c b/io_uring/fdinfo.c
> index 300455b4bc12..c53678875416 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;
Reviewed-by: Gabriel Krisman Bertazi <krisman@suse.de>
--
Gabriel Krisman Bertazi
prev parent reply other threads:[~2023-09-01 20:58 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-09-01 20:01 [PATCH] io_uring/fdinfo: only print ->sq_array[] if it's there Jens Axboe
2023-09-01 20:58 ` Gabriel Krisman Bertazi [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87edjhbogm.fsf@suse.de \
--to=krisman@suse.de \
--cc=asml.silence@gmail.com \
--cc=axboe@kernel.dk \
--cc=io-uring@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).