From: Dan Carpenter <dan.carpenter@oracle.com>
To: satishkh@cisco.com
Cc: linux-scsi@vger.kernel.org
Subject: re: fnic: Using rport->dd_data to check rport online instead of rport_lookup.
Date: Fri, 1 Apr 2016 22:44:45 +0300 [thread overview]
Message-ID: <20160401194445.GA21247@mwanda> (raw)
Hello Satish Kharat,
This is a semi-automatic email about new static checker warnings.
The patch ce4b9e8980fa: "fnic: Using rport->dd_data to check rport
online instead of rport_lookup." from Mar 18, 2016, leads to the
following Smatch complaint:
drivers/scsi/fnic/fnic_scsi.c:457 fnic_queuecommand_lck()
warn: variable dereferenced before check 'rport' (see line 449)
drivers/scsi/fnic/fnic_scsi.c
448 rport = starget_to_rport(scsi_target(sc->device));
449 ret = fc_remote_port_chkready(rport);
^^^^^
Old dereference (inside function call).
450 if (ret) {
451 atomic64_inc(&fnic_stats->misc_stats.rport_not_ready);
452 sc->result = ret;
453 done(sc);
454 return 0;
455 }
456
457 if (rport) {
^^^^^
The patch adds a check but too late. Probably just delete the check?
458 struct fc_rport_libfc_priv *rp = rport->dd_data;
459
regards,
dan carpenter
next reply other threads:[~2016-04-01 19:44 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-04-01 19:44 Dan Carpenter [this message]
2016-04-12 1:53 ` fnic: Using rport->dd_data to check rport online instead of rport_lookup Martin K. Petersen
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=20160401194445.GA21247@mwanda \
--to=dan.carpenter@oracle.com \
--cc=linux-scsi@vger.kernel.org \
--cc=satishkh@cisco.com \
/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;
as well as URLs for NNTP newsgroup(s).