From: Jens Axboe <axboe@kernel.dk>
To: Pavel Begunkov <asml.silence@gmail.com>,
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 07:14:06 -0600 [thread overview]
Message-ID: <46aa0cb5-87e6-47e8-b949-7e414e5723e3@kernel.dk> (raw)
In-Reply-To: <83595e5a-ae53-4ca8-86a9-5909833b77bd@gmail.com>
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!
--
Jens Axboe
next prev parent reply other threads:[~2025-04-23 13:14 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 [this message]
2025-04-23 15:59 ` Pavel Begunkov
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=46aa0cb5-87e6-47e8-b949-7e414e5723e3@kernel.dk \
--to=axboe@kernel.dk \
--cc=asml.silence@gmail.com \
--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