public inbox for io-uring@vger.kernel.org
 help / color / mirror / Atom feed
From: Greg KH <gregkh@linuxfoundation.org>
To: Mallikarjun Thammanavar <mallikarjunst09@gmail.com>
Cc: axboe@kernel.dk, io-uring@vger.kernel.org,
	linux-kernel@vger.kernel.org, regressions@lists.linux.dev,
	"kernelci . org bot" <bot@kernelci.org>
Subject: Re: [PATCH] io_uring: initialize vairable "sqe" to silence build warning
Date: Wed, 22 Oct 2025 17:17:56 +0200	[thread overview]
Message-ID: <2025102217-manicure-debtor-4d0f@gregkh> (raw)
In-Reply-To: <20251022150716.2157854-1-mallikarjunst09@gmail.com>

On Wed, Oct 22, 2025 at 05:07:16PM +0200, Mallikarjun Thammanavar wrote:
> clang-17 compiler throws build error when [-Werror,-Wuninitialized] are enabled
> error: variable 'sqe' is uninitialized when used here [-Werror,-Wuninitialized]
> 
> Initialize struct io_uring_sqe *sqe = NULL; to have clean build
> Reported-by: kernelci.org bot <bot@kernelci.org>
> Link: https://lore.kernel.org/regressions/176110914348.5309.724397608932251368@15dd6324cc71/
> 
> Signed-off-by: Mallikarjun Thammanavar <mallikarjunst09@gmail.com>
> ---
>  io_uring/fdinfo.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/io_uring/fdinfo.c b/io_uring/fdinfo.c
> index d5aa64203de5..e5792b794f8b 100644
> --- a/io_uring/fdinfo.c
> +++ b/io_uring/fdinfo.c
> @@ -89,7 +89,7 @@ static void __io_uring_show_fdinfo(struct io_ring_ctx *ctx, struct seq_file *m)
>  	seq_printf(m, "CachedCqTail:\t%u\n", data_race(ctx->cached_cq_tail));
>  	seq_printf(m, "SQEs:\t%u\n", sq_tail - sq_head);
>  	while (sq_head < sq_tail) {
> -		struct io_uring_sqe *sqe;
> +		struct io_uring_sqe *sqe = NULL;

If you do that, then other tools will report a NULL dereference, right?

Please fix the tools, don't paper over stuff like this.

thanks,

greg k-h

  reply	other threads:[~2025-10-22 15:17 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-10-22 15:07 [PATCH] io_uring: initialize vairable "sqe" to silence build warning Mallikarjun Thammanavar
2025-10-22 15:17 ` Greg KH [this message]
2025-10-22 15:26 ` Jens Axboe
2025-10-22 15:59   ` Mallikarjun S T

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=2025102217-manicure-debtor-4d0f@gregkh \
    --to=gregkh@linuxfoundation.org \
    --cc=axboe@kernel.dk \
    --cc=bot@kernelci.org \
    --cc=io-uring@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mallikarjunst09@gmail.com \
    --cc=regressions@lists.linux.dev \
    /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