From: Robert Love <robert.w.love@intel.com>
To: james.bottomley@hansenpartnership.com, linux-scsi@vger.kernel.org
Cc: Steve Ma <steve.ma@intel.com>, Robert Love <robert.w.love@intel.com>
Subject: [PATCH 02/17] fcoe: exch mgr is freed while lport still retrying sequences
Date: Fri, 06 Feb 2009 10:55:59 -0800 [thread overview]
Message-ID: <20090206185559.26188.41553.stgit@fritz> (raw)
In-Reply-To: <20090206185548.26188.51580.stgit@fritz>
From: Steve Ma <steve.ma@intel.com>
When a sequence cannot be delivered to the target, the local
port will schedule retries, While this process is in progress,
if we destroy the FCoE interface, the fcoe_sw_destroy routine is
entered, and the fc_exch_mgr_free(lp->emp) is called. Thus
if fc_exch_alloc() is called when retrying the sequence,
the mempool_alloc() will fail to allocate the exchange because
the mempool of the exchange manager has already been released.
This patch is to cancel any pending retry work of the local
port before we start to destroy the interface.
Also, when resetting the local port, we should also stop the
scheduled pending retries.
Signed-off-by: Steve Ma <steve.ma@intel.com>
Signed-off-by: Robert Love <robert.w.love@intel.com>
---
drivers/scsi/libfc/fc_lport.c | 2 ++
1 files changed, 2 insertions(+), 0 deletions(-)
diff --git a/drivers/scsi/libfc/fc_lport.c b/drivers/scsi/libfc/fc_lport.c
index a6ab692..a60b919 100644
--- a/drivers/scsi/libfc/fc_lport.c
+++ b/drivers/scsi/libfc/fc_lport.c
@@ -617,6 +617,7 @@ int fc_fabric_logoff(struct fc_lport *lport)
{
lport->tt.disc_stop_final(lport);
mutex_lock(&lport->lp_mutex);
+ cancel_delayed_work_sync(&lport->retry_work);
fc_lport_enter_logo(lport);
mutex_unlock(&lport->lp_mutex);
return 0;
@@ -938,6 +939,7 @@ static void fc_lport_enter_reset(struct fc_lport *lport)
fc_host_port_id(lport->host), fc_lport_state(lport));
fc_lport_state_enter(lport, LPORT_ST_RESET);
+ cancel_delayed_work_sync(&lport->retry_work);
if (lport->dns_rp)
lport->tt.rport_logoff(lport->dns_rp);
next prev parent reply other threads:[~2009-02-06 18:56 UTC|newest]
Thread overview: 23+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-02-06 18:55 [PATCH 00/17] Open-FCoE Updates Robert Love
2009-02-06 18:55 ` [PATCH 01/17] libfc: fixed a read IO data integrity issue when a IO data frame lost Robert Love
2009-02-06 18:55 ` Robert Love [this message]
2009-02-06 18:56 ` [PATCH 03/17] libfc: Don't violate transport template for rogue port creation Robert Love
2009-02-06 18:56 ` [PATCH 04/17] libfc: correct RPORT_TO_PRIV usage Robert Love
2009-02-06 18:56 ` [PATCH 05/17] libfc: rename rp to rdata in fc_disc_new_target() Robert Love
2009-02-06 18:56 ` [PATCH 06/17] libfc: check for err when recv and state is incorrect Robert Love
2009-02-06 18:56 ` [PATCH 07/17] fcoe: runtime debugging with debug_logging module parameter Robert Love
2009-02-06 18:56 ` [PATCH 08/17] fcoe: Logging review changes Robert Love
2009-02-06 18:56 ` [PATCH 09/17] libfc: runtime debugging with debug_logging module parameter Robert Love
2009-02-06 18:56 ` [PATCH 10/17] libfc: Logging review changes Robert Love
2009-02-06 18:56 ` [PATCH 11/17] libfc: Cleanup libfc_function_template comments Robert Love
2009-02-06 18:56 ` [PATCH 12/17] libfc, fcoe: Fix kerneldoc comments Robert Love
2009-02-06 18:56 ` [PATCH 13/17] libfc, fcoe: Cleanup function formatting and minor typos Robert Love
2009-02-06 18:57 ` [PATCH 14/17] libfc, fcoe: Remove unnecessary cast by removing inline wrapper Robert Love
2009-02-06 18:57 ` [PATCH 15/17] fcoe: Use setup_timer() and mod_timer() Robert Love
2009-02-06 18:57 ` [PATCH 16/17] fcoe: Correct fcoe_transports initialization vs. registration Robert Love
2009-02-06 18:57 ` [PATCH 17/17] [SCSI] fcoe: fix kfree(skb) Robert Love
2009-02-26 2:49 ` [PATCH 00/17] Open-FCoE Updates Mike Christie
2009-02-26 18:29 ` Robert Love
2009-02-26 19:05 ` James Bottomley
2009-02-26 19:54 ` Love, Robert W
2009-03-02 22:24 ` Love, Robert W
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=20090206185559.26188.41553.stgit@fritz \
--to=robert.w.love@intel.com \
--cc=james.bottomley@hansenpartnership.com \
--cc=linux-scsi@vger.kernel.org \
--cc=steve.ma@intel.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