From: Heiko Carstens <heiko.carstens@de.ibm.com>
Cc: linux-scsi@vger.kernel.org,
Sven Schuetz <sven@linux.vnet.ibm.com>,
James.Smart@Emulex.Com,
Christof Schmitt <christof.schmitt@de.ibm.com>
Subject: Re: [patch 2/2] zfcp: Add FC pass-through support
Date: Wed, 8 Apr 2009 13:29:45 +0200 [thread overview]
Message-ID: <20090408132945.6c847b74@osiris.boeblingen.de.ibm.com> (raw)
In-Reply-To: <20090406163534.659628000@de.ibm.com>
On Mon, 06 Apr 2009 18:31:47 +0200
Christof Schmitt <christof.schmitt@de.ibm.com> wrote:
> + els_fc_job->els.adapter = adapter;
> + if (rport) {
> + read_lock_irq(&zfcp_data.config_lock);
> + port = rport->dd_data;
> + if (port)
> + zfcp_port_get(port);
> + read_unlock_irq(&zfcp_data.config_lock);
> + if (!port) {
> + kfree(els_fc_job);
> + return -EINVAL;
> + }
> + els_fc_job->els.port = port;
> + els_fc_job->els.d_id = port->d_id;
> + zfcp_port_put(port);
> + } else {
This piece looks a bit strange. Why is the reference count of the port
increased and afterwards decreased again? Still the pointer to the port
gets added to els_fc_job->els.port and therefore the structure will be
accessed later.
So either the reference count is decreased too early and this is a bug
or it's not needed at all.
next prev parent reply other threads:[~2009-04-08 11:29 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-04-06 16:31 [patch 0/2] FC pass-through support for zfcp Christof Schmitt
2009-04-06 16:31 ` [patch 1/2] zfcp: Set WKA-port to offline on adapter deactivation Christof Schmitt
2009-04-06 16:31 ` [patch 2/2] zfcp: Add FC pass-through support Christof Schmitt
2009-04-07 23:17 ` James Smart
2009-04-08 7:39 ` Christof Schmitt
2009-04-08 11:29 ` Heiko Carstens [this message]
2009-04-08 11:38 ` Christof Schmitt
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=20090408132945.6c847b74@osiris.boeblingen.de.ibm.com \
--to=heiko.carstens@de.ibm.com \
--cc=James.Smart@Emulex.Com \
--cc=christof.schmitt@de.ibm.com \
--cc=linux-scsi@vger.kernel.org \
--cc=sven@linux.vnet.ibm.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