linux-scsi.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: James Smart <James.Smart@Emulex.Com>
To: Adrian Bunk <bunk@stusta.de>
Cc: James Bottomley <James.Bottomley@SteelEye.com>,
	linux-kernel@vger.kernel.org, linux-scsi@vger.kernel.org,
	Michal Piotrowski <michal.k.k.piotrowski@gmail.com>
Subject: Re: 2.6.23 regression: lpfc_sli.c: off-by-10
Date: Tue, 24 Jul 2007 09:24:12 -0400	[thread overview]
Message-ID: <46A5FD7C.6050104@emulex.com> (raw)
In-Reply-To: <20070723003215.GQ26212@stusta.de>

Adrian,

Thanks.

Syntax-wise, it is incorrect. However there's no risk.  The datastructure
its indexing into is a union, and its size is sufficient for the index.
The union supports old and new firmware interfaces. We mistakenly used the
array for the old interface and should have used the (larger) array for
the newer interface.

We're posting a set of fixes later this week and will include the fix for
this.

-- james s


Adrian Bunk wrote:
> The Coverity checker spotted the following off-by-10
> in drivers/scsi/lpfc/lpfc_sli.c:
> 
> 
> <--  snip  -->
> 
> ...
> static int
> lpfc_sli_process_unsol_iocb(struct lpfc_hba *phba, struct lpfc_sli_ring *pring,
>                             struct lpfc_iocbq *saveq)
> {
> ...
>                         saveq->context3 = lpfc_sli_replace_hbqbuff(phba,
>                                                 irsp->un.ulpWord[15]);
> ...
> 
> <--  snip  -->
> 
> 
> due to the following code in drivers/scsi/lpfc/lpfc_hw.h:
> 
> 
> <--  snip  -->
> 
> ...
> #define IOCB_WORD_SZ    8
> ...
> typedef struct _IOCB {  /* IOCB structure */
> ...
>                 uint32_t ulpWord[IOCB_WORD_SZ - 2];     /* generic 6 'words' */
> ...
> 
> <--  snip  -->
> 
> 
> cu
> Adrian
> 

      reply	other threads:[~2007-07-24 13:31 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-07-23  0:32 2.6.23 regression: lpfc_sli.c: off-by-10 Adrian Bunk
2007-07-24 13:24 ` James Smart [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=46A5FD7C.6050104@emulex.com \
    --to=james.smart@emulex.com \
    --cc=James.Bottomley@SteelEye.com \
    --cc=bunk@stusta.de \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-scsi@vger.kernel.org \
    --cc=michal.k.k.piotrowski@gmail.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).