Re: [PATCH][RESEND] scsi: megaraid: Avoid mismatched storage type sizes

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

 



On Wed, 5 Jan 2022 09:36:33 -0800, Kees Cook wrote:

> Remove needless use of mbox_t, replacing with just struct
> mbox_out. Silences compiler warnings under a -Warray-bounds build:
> 
> drivers/scsi/megaraid.c: In function 'megaraid_probe_one':
> drivers/scsi/megaraid.c:3615:30: error: array subscript 'mbox_t[0]' is partly outside array bounds of 'unsigned char[15]' [-Werror=array-bounds]
>  3615 |         mbox->m_out.xferaddr = (u32)adapter->buf_dma_handle;
>       |         ~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> drivers/scsi/megaraid.c:3599:23: note: while referencing 'raw_mbox'
>  3599 |         unsigned char raw_mbox[sizeof(struct mbox_out)];
>       |                       ^~~~~~~~
> 
> [...]

Applied to 5.17/scsi-queue, thanks!

[1/1] scsi: megaraid: Avoid mismatched storage type sizes
      https://git.kernel.org/mkp/scsi/c/315d049ad195

-- 
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