From: Dan Carpenter <dan.carpenter@oracle.com>
To: james.smart@avagotech.com
Cc: linux-scsi@vger.kernel.org
Subject: re: lpfc: Fix rport leak.
Date: Wed, 10 Jun 2015 18:48:20 +0300 [thread overview]
Message-ID: <20150610154820.GI10549@mwanda> (raw)
Hello James Smart,
This is a semi-automatic email about new static checker warnings.
The patch 466e840b7809: "lpfc: Fix rport leak." from May 21, 2015,
leads to the following Smatch complaint:
drivers/scsi/lpfc/lpfc_hbadisc.c:3905 lpfc_register_remote_port()
error: we previously assumed 'rdata' could be null (see line 3903)
drivers/scsi/lpfc/lpfc_hbadisc.c
3902 ndlp->rport = NULL;
3903 if (rdata && rdata->pnode == ndlp)
^^^^^
Patch introduces a new check.
3904 lpfc_nlp_put(ndlp);
3905 rdata->pnode = NULL;
^^^^^^^^^^^^
Unchecked dereference.
3906 /* drop reference for earlier registeration */
3907 put_device(&rport->dev);
regards,
dan carpenter
reply other threads:[~2015-06-10 15:48 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=20150610154820.GI10549@mwanda \
--to=dan.carpenter@oracle.com \
--cc=james.smart@avagotech.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