All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Martin K. Petersen" <martin.petersen@oracle.com>
To: MPT-FusionLinux.pdl@broadcom.com,
	Sreekanth Reddy <sreekanth.reddy@broadcom.com>,
	Helge Deller <deller@gmx.de>,
	linux-scsi@vger.kernel.org,
	Sathya Prakash <sathya.prakash@broadcom.com>,
	James Bottomley <James.Bottomley@hansenpartnership.com>
Cc: "Martin K . Petersen" <martin.petersen@oracle.com>,
	linux-parisc@vger.kernel.org
Subject: Re: [PATCH] scsi: mpt3sas: Fix out-of-bounds compiler warning
Date: Tue,  7 Jun 2022 22:27:54 -0400	[thread overview]
Message-ID: <165465514542.8982.4564879161445933533.b4-ty@oracle.com> (raw)
In-Reply-To: <YpZ197iZdDZSCzrT@p100>

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

      reply	other threads:[~2022-06-08  6:54 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-05-31 20:09 [PATCH] scsi: mpt3sas: Fix out-of-bounds compiler warning Helge Deller
2022-06-08  2:27 ` Martin K. Petersen [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=165465514542.8982.4564879161445933533.b4-ty@oracle.com \
    --to=martin.petersen@oracle.com \
    --cc=James.Bottomley@hansenpartnership.com \
    --cc=MPT-FusionLinux.pdl@broadcom.com \
    --cc=deller@gmx.de \
    --cc=linux-parisc@vger.kernel.org \
    --cc=linux-scsi@vger.kernel.org \
    --cc=sathya.prakash@broadcom.com \
    --cc=sreekanth.reddy@broadcom.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.