public inbox for linux-scsi@vger.kernel.org
 help / color / mirror / Atom feed
* re: [SCSI] lpfc 8.3.19: Added support for ELS RRQ command
@ 2012-05-13 18:50 Dan Carpenter
  0 siblings, 0 replies; only message in thread
From: Dan Carpenter @ 2012-05-13 18:50 UTC (permalink / raw)
  To: james.smart; +Cc: linux-scsi

[ 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


^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2012-05-13 18:50 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-05-13 18:50 [SCSI] lpfc 8.3.19: Added support for ELS RRQ command Dan Carpenter

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox