Linux io-uring development
 help / color / mirror / Atom feed
From: Pavel Begunkov <asml.silence@gmail.com>
To: Jens Axboe <axboe@kernel.dk>, Dan Carpenter <dan.carpenter@linaro.org>
Cc: io-uring@vger.kernel.org
Subject: Re: [bug report] io_uring/zcrx: add support for multiple ifqs
Date: Wed, 23 Apr 2025 16:59:41 +0100	[thread overview]
Message-ID: <e46727de-e981-4aa3-9cb4-38a5c4b27c5c@gmail.com> (raw)
In-Reply-To: <46aa0cb5-87e6-47e8-b949-7e414e5723e3@kernel.dk>

On 4/23/25 14:14, Jens Axboe wrote:
> On 4/23/25 4:30 AM, Pavel Begunkov wrote:
>> On 4/23/25 11:04, Pavel Begunkov wrote:
>>> On 4/23/25 08:15, Dan Carpenter wrote:
>>>> Hello Pavel Begunkov,
>>>>
>>>> Commit 9c2a1c508442 ("io_uring/zcrx: add support for multiple ifqs")
>>>> from Apr 20, 2025 (linux-next), leads to the following Smatch static
>>>> checker warning:
>>>>
>>>>      io_uring/zcrx.c:457 io_register_zcrx_ifq()
>>>>      error: uninitialized symbol 'id'.
>>>>
>>>> io_uring/zcrx.c
>>> ...
>>>>       396         ifq = io_zcrx_ifq_alloc(ctx);
>>>>       397         if (!ifq)
>>>>       398                 return -ENOMEM;
>>>>       399
>>>>       400         scoped_guard(mutex, &ctx->mmap_lock) {
>>>>       401                 /* preallocate id */
>>>>       402                 ret = xa_alloc(&ctx->zcrx_ctxs, &id, NULL, xa_limit_31b, GFP_KERNEL);
>>>>       403                 if (ret)
>>>>       404                         goto err;
>>>>
>>>> Potentially uninitialized on this path.  Presumably we don't need to
>>>> erase id if alloc fails.
>>>
>>> Thanks for letting know
>>
>> Jens, do you want a separate patch or to fix it up as it's the top
>> patch? This should do
> 
> I can just fold it in - done!

Great, thanks!

-- 
Pavel Begunkov


      reply	other threads:[~2025-04-23 15:58 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-04-23  7:15 [bug report] io_uring/zcrx: add support for multiple ifqs Dan Carpenter
2025-04-23 10:04 ` Pavel Begunkov
2025-04-23 10:30   ` Pavel Begunkov
2025-04-23 13:14     ` Jens Axboe
2025-04-23 15:59       ` Pavel Begunkov [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=e46727de-e981-4aa3-9cb4-38a5c4b27c5c@gmail.com \
    --to=asml.silence@gmail.com \
    --cc=axboe@kernel.dk \
    --cc=dan.carpenter@linaro.org \
    --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