Re: [PATCH] scsi: advansys: Replace zero-length array with flexible-array member

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

 




On 2/12/20 19:14, Matthew Wilcox wrote:
> On Wed, Feb 12, 2020 at 06:02:11PM -0600, Gustavo A. R. Silva wrote:
>> Also, notice that, dynamic memory allocations won't be affected by
>> this change:
> 
> Shouldn't you also convert this:
>                 asc_sg_head = kzalloc(sizeof(asc_scsi_q->sg_head) +
>                         use_sg * sizeof(struct asc_sg_list), GFP_ATOMIC);
> to use struct_size()?
> 

It's not a requirement to do that prior to applying the change proposed by
this patch.

Thanks
--
Gustavo



[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [SCSI Target Devel]     [Linux SCSI Target Infrastructure]     [Kernel Newbies]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Linux IIO]     [Samba]     [Device Mapper]

  Powered by Linux