Re: [PATCH] block: ensure that struct blk_mq_alloc_data is fully initialized

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 4/15/25 8:59 AM, Jens Axboe wrote:
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.

Hi Jens,

I think we agree if the word "explicit" would be added to the patch
description.

Thanks,

Bart.






[Index of Archives]     [Linux RAID]     [Linux SCSI]     [Linux ATA RAID]     [IDE]     [Linux Wireless]     [Linux Kernel]     [ATH6KL]     [Linux Bluetooth]     [Linux Netdev]     [Kernel Newbies]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Device Mapper]

  Powered by Linux