From: Dan Carpenter <dan.carpenter@oracle.com>
To: jsmart2021@gmail.com
Cc: linux-scsi@vger.kernel.org
Subject: [bug report] scsi: lpfc: NVME Target: Receive buffer updates
Date: Mon, 27 Feb 2017 19:44:25 +0300 [thread overview]
Message-ID: <20170227164349.GA22044@mwanda> (raw)
Hello James Smart,
This is a semi-automatic email about new static checker warnings.
The patch 2d7dbc4c2775: "scsi: lpfc: NVME Target: Receive buffer
updates" from Feb 12, 2017, leads to the following Smatch complaint:
drivers/scsi/lpfc/lpfc_sli.c:15194 lpfc_mrq_create()
warn: variable dereferenced before check 'hrq' (see line 15188)
drivers/scsi/lpfc/lpfc_sli.c
15181 cnt = 0;
15182
15183 for (idx = 0; idx < numrq; idx++) {
15184 hrq = hrqp[idx];
15185 drq = drqp[idx];
15186 cq = cqp[idx];
15187
15188 if (hrq->entry_count != drq->entry_count) {
^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^
Dereferences.
15189 status = -EINVAL;
15190 goto out;
15191 }
15192
15193 /* sanity check on queue memory */
15194 if (!hrq || !drq || !cq) {
^^^^^^^^^^^
Too late.
15195 status = -ENODEV;
15196 goto out;
regards,
dan carpenter
next reply other threads:[~2017-02-27 23:28 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-02-27 16:44 Dan Carpenter [this message]
2017-03-04 17:45 ` [bug report] scsi: lpfc: NVME Target: Receive buffer updates 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=20170227164349.GA22044@mwanda \
--to=dan.carpenter@oracle.com \
--cc=jsmart2021@gmail.com \
--cc=linux-scsi@vger.kernel.org \
/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.