Re: [PATCH] scsi: mpt3sas: Fix out-of-bounds compiler warning

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

 



On Tue, 31 May 2022 22:09:27 +0200, Helge Deller wrote:

> I'm facing this warning when building for the parisc64 architecture:
> 
> drivers/scsi/mpt3sas/mpt3sas_base.c: In function ‘_base_make_ioc_operational’:
> drivers/scsi/mpt3sas/mpt3sas_base.c:5396:40: warning: array subscript ‘Mpi2SasIOUnitPage1_t {aka struct _MPI2_CONFIG_PAGE_SASIOUNIT_1}[0]’ is partly outside array bounds of ‘unsigned char[20]’ [-Warray-bounds]
>  5396 |             (le16_to_cpu(sas_iounit_pg1->SASWideMaxQueueDepth)) ?
> drivers/scsi/mpt3sas/mpt3sas_base.c:5382:26: note: referencing an object of size 20 allocated by ‘kzalloc’
>  5382 |         sas_iounit_pg1 = kzalloc(sz, GFP_KERNEL);
>       |                          ^~~~~~~~~~~~~~~~~~~~~~~
> 
> [...]

Applied to 5.19/scsi-fixes, thanks!

[1/1] scsi: mpt3sas: Fix out-of-bounds compiler warning
      https://git.kernel.org/mkp/scsi/c/120f1d95efb1

-- 
Martin K. Petersen	Oracle Linux Engineering



[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