From: Dan Carpenter <dan.carpenter@oracle.com>
To: james.smart@emulex.com
Cc: linux-scsi@vger.kernel.org
Subject: re: [SCSI] lpfc 8.3.19: Added support for ELS RRQ command
Date: Sun, 13 May 2012 21:50:06 +0300 [thread overview]
Message-ID: <20120513185005.GD16541@elgon.mountain> (raw)
[ Hi, I've made some changes to Smatch so I'm sending bug reports for
some old bugs. Hope nobody minds and all. ]
Hello James Smart,
This is a semi-automatic email about new static checker warnings.
The patch 19ca760979e4: "[SCSI] lpfc 8.3.19: Added support for ELS
RRQ command" from Nov 20, 2010, leads to the following Smatch
complaint:
drivers/scsi/lpfc/lpfc_sli.c:15999 lpfc_drain_txq()
warn: variable dereferenced before check 'piocbq' (see line 15993)
drivers/scsi/lpfc/lpfc_sli.c
15992 piocbq = lpfc_sli_ringtx_get(phba, pring);
15993 sglq = __lpfc_sli_get_sglq(phba, piocbq);
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
New call to __lpfc_sli_get_sglq() dereferences "piocbq".
15994 if (!sglq) {
15995 __lpfc_sli_ringtx_put(phba, pring, piocbq);
15996 spin_unlock_irqrestore(&phba->hbalock, iflags);
15997 break;
15998 } else {
15999 if (!piocbq) {
^^^^^^^
Old check.
16000 /* The txq_cnt out of sync. This should
16001 * never happen
regards,
dan carpenter
reply other threads:[~2012-05-13 18:50 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=20120513185005.GD16541@elgon.mountain \
--to=dan.carpenter@oracle.com \
--cc=james.smart@emulex.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox