public inbox for linux-scsi@vger.kernel.org
 help / color / mirror / Atom feed
From: Dan Carpenter <dan.carpenter@oracle.com>
To: james.smart@emulex.com
Cc: linux-scsi@vger.kernel.org
Subject: re: [SCSI] lpfc 8.3.29: T10 Diff fixes and enhancements
Date: Mon, 20 Feb 2012 14:39:33 +0300	[thread overview]
Message-ID: <20120220113933.GA28224@elgon.mountain> (raw)

Hello James Smart,

This is a semi-automatic email about new static checker warnings.

The patch acd6859b084d: "[SCSI] lpfc 8.3.29: T10 Diff fixes and 
enhancements" from Jan 18, 2012, leads to the following Smatch 
complaint:

drivers/scsi/lpfc/lpfc_scsi.c:1592 lpfc_bg_err_inject()
	 error: we previously assumed 'apptag' could be null (see line 1430)

drivers/scsi/lpfc/lpfc_scsi.c
  1429		/* Should we change the Application Tag */
  1430		if (apptag) {
                    ^^^^^^
Old check.

  1431			if (phba->lpfc_injerr_wapp_cnt) {
  1432				switch (op) {
  1433				case SCSI_PROT_WRITE_PASS:
  1434					if (blockoff && src) {

[snip]

  1585				case SCSI_PROT_READ_STRIP:
  1586				case SCSI_PROT_READ_PASS:
  1587					/*
  1588					 * For READ_STRIP and READ_PASS, force the
  1589					 * error on data being read off the wire. It
  1590					 * should force an IO error to the driver.
  1591					 */
  1592					*apptag = 0xDEAD;
                                        ^^^^^^^
New dereference not checked.  Btw, apptag is always zero in the current
code.

  1593					phba->lpfc_injerr_rgrd_cnt--;
  1594					phba->lpfc_injerr_lba = LPFC_INJERR_LBA_OFF;

regards,
dan carpenter


                 reply	other threads:[~2012-02-20 11:39 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=20120220113933.GA28224@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