From: James Smart <James.Smart@emulex.com>
To: Wei Yongjun <weiyj.lk@gmail.com>
Cc: JBottomley@parallels.com, yongjun_wei@trendmicro.com.cn,
linux-scsi@vger.kernel.org
Subject: Re: [PATCH -next] [SCSI] lpfc 8.3.36: fix potential NULL pointer dereference in lpfc_sli4_rq_put()
Date: Thu, 6 Dec 2012 10:46:10 -0500 [thread overview]
Message-ID: <50C0BDC2.6070208@emulex.com> (raw)
In-Reply-To: <CAPgLHd8VqtYG2cS3627WtxizaNugb9x=85+cZiQEgQc3Fp_kjw@mail.gmail.com>
Acked-By: James Smart <james.smart@emulex.com>
Thanks
-- james s
On 12/2/2012 8:33 AM, Wei Yongjun wrote:
> From: Wei Yongjun <yongjun_wei@trendmicro.com.cn>
>
> The dereference to 'put_index' should be moved below the NULL test.
>
> Signed-off-by: Wei Yongjun <yongjun_wei@trendmicro.com.cn>
> ---
> drivers/scsi/lpfc/lpfc_sli.c | 3 ++-
> 1 file changed, 2 insertions(+), 1 deletion(-)
>
> diff --git a/drivers/scsi/lpfc/lpfc_sli.c b/drivers/scsi/lpfc/lpfc_sli.c
> index 624eab3..a9a7fd7 100644
> --- a/drivers/scsi/lpfc/lpfc_sli.c
> +++ b/drivers/scsi/lpfc/lpfc_sli.c
> @@ -431,11 +431,12 @@ lpfc_sli4_rq_put(struct lpfc_queue *hq, struct lpfc_queue *dq,
> struct lpfc_rqe *temp_hrqe;
> struct lpfc_rqe *temp_drqe;
> struct lpfc_register doorbell;
> - int put_index = hq->host_index;
> + int put_index;
>
> /* sanity check on queue memory */
> if (unlikely(!hq) || unlikely(!dq))
> return -ENOMEM;
> + put_index = hq->host_index;
> temp_hrqe = hq->qe[hq->host_index].rqe;
> temp_drqe = dq->qe[dq->host_index].rqe;
>
>
>
>
>
next prev parent reply other threads:[~2012-12-06 15:46 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-12-02 13:33 [PATCH -next] [SCSI] lpfc 8.3.36: fix potential NULL pointer dereference in lpfc_sli4_rq_put() Wei Yongjun
2012-12-06 15:46 ` James Smart [this message]
2013-03-18 18:08 ` James Smart
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=50C0BDC2.6070208@emulex.com \
--to=james.smart@emulex.com \
--cc=JBottomley@parallels.com \
--cc=linux-scsi@vger.kernel.org \
--cc=weiyj.lk@gmail.com \
--cc=yongjun_wei@trendmicro.com.cn \
/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.