Commit f7db2c15 authored by Steve Ma's avatar Steve Ma Committed by James Bottomley
Browse files

[SCSI] libfc: exch mgr is freed while lport still retrying sequences

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: default avatarSteve Ma <>
Signed-off-by: default avatarRobert Love <>
Signed-off-by: default avatarJames Bottomley <>
parent 26d9cab5
......@@ -619,6 +619,7 @@ int fc_fabric_logoff(struct fc_lport *lport)
return 0;
......@@ -918,6 +919,7 @@ static void fc_lport_recv_req(struct fc_lport *lport, struct fc_seq *sp,
int fc_lport_reset(struct fc_lport *lport)
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment