* re: [SCSI] lpfc 8.3.29: T10 Diff fixes and enhancements
@ 2012-02-20 11:39 Dan Carpenter
0 siblings, 0 replies; only message in thread
From: Dan Carpenter @ 2012-02-20 11:39 UTC (permalink / raw)
To: james.smart; +Cc: linux-scsi
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
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2012-02-20 11:39 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-02-20 11:39 [SCSI] lpfc 8.3.29: T10 Diff fixes and enhancements Dan Carpenter
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox