From: Jens Axboe <axboe@kernel.dk>
To: Bart Van Assche <bvanassche@acm.org>,
"linux-block@vger.kernel.org" <linux-block@vger.kernel.org>
Subject: Re: [PATCH] block: ensure that struct blk_mq_alloc_data is fully initialized
Date: Tue, 15 Apr 2025 09:59:11 -0600 [thread overview]
Message-ID: <4b0eee16-a37b-4770-95f0-c5f02160e0da@kernel.dk> (raw)
In-Reply-To: <a8074c72-e258-4b34-a629-c253997dfab9@acm.org>
On 4/15/25 9:50 AM, Bart Van Assche wrote:
> On 4/15/25 7:51 AM, Jens Axboe wrote:
>> On x86, rep stos will be emitted to clear the the blk_mq_alloc_data
>> struct, as not all members are being initialied.
>
> "Partial initialization" never happens in the C language when
> initializing a data structure. If a data structure is initialized,
> members that have not been specified are initialized to zero (the
> compiler is not required to initialize padding bytes). In other words,
> the description of this patch needs to be improved.
How is the description inaccurate? As not all members are being
explicitly initialized, rep stos is emitted to do so.
--
Jens Axboe
next prev parent reply other threads:[~2025-04-15 15:59 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-04-15 14:51 [PATCH] block: ensure that struct blk_mq_alloc_data is fully initialized Jens Axboe
2025-04-15 15:39 ` Chaitanya Kulkarni
2025-04-15 15:50 ` Bart Van Assche
2025-04-15 15:59 ` Jens Axboe [this message]
2025-04-15 16:13 ` Bart Van Assche
2025-04-15 16:15 ` Jens Axboe
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=4b0eee16-a37b-4770-95f0-c5f02160e0da@kernel.dk \
--to=axboe@kernel.dk \
--cc=bvanassche@acm.org \
--cc=linux-block@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