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



[Index of Archives]     [Linux SoC]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux