Commit 5bf3f39f authored by Eddie Wai's avatar Eddie Wai Committed by James Bottomley

[SCSI] bnx2i: Fixed a cid leak issue for 5771X (10g)

A cid leak issue was found when the connect destroy request exceeded
the driver's disconnection timeout.  This will lead to a cid resource
leak issue.
The fix is to allow the cid cleanup even when this happens.
Signed-off-by: default avatarEddie Wai <eddie.wai@broadcom.com>
Acked-by: default avatarAnil Veerabhadrappa <anilgv@broadcom.com>
Reviewed-by: default avatarMichael Chan <mchan@broadcom.com>
Reviewed-by: default avatarMike Christie <michaelc@cs.wisc.edu>
Signed-off-by: default avatarJames Bottomley <James.Bottomley@suse.de>
parent cf464fc5
...@@ -1640,18 +1640,26 @@ static struct bnx2i_hba *bnx2i_check_route(struct sockaddr *dst_addr) ...@@ -1640,18 +1640,26 @@ static struct bnx2i_hba *bnx2i_check_route(struct sockaddr *dst_addr)
static int bnx2i_tear_down_conn(struct bnx2i_hba *hba, static int bnx2i_tear_down_conn(struct bnx2i_hba *hba,
struct bnx2i_endpoint *ep) struct bnx2i_endpoint *ep)
{ {
if (test_bit(BNX2I_CNIC_REGISTERED, &hba->reg_with_cnic)) if (test_bit(BNX2I_CNIC_REGISTERED, &hba->reg_with_cnic) && ep->cm_sk)
hba->cnic->cm_destroy(ep->cm_sk); hba->cnic->cm_destroy(ep->cm_sk);
if (test_bit(ADAPTER_STATE_GOING_DOWN, &ep->hba->adapter_state))
ep->state = EP_STATE_DISCONN_COMPL;
if (test_bit(BNX2I_NX2_DEV_57710, &hba->cnic_dev_type) && if (test_bit(BNX2I_NX2_DEV_57710, &hba->cnic_dev_type) &&
ep->state == EP_STATE_DISCONN_TIMEDOUT) { ep->state == EP_STATE_DISCONN_TIMEDOUT) {
printk(KERN_ALERT "bnx2i - ERROR - please submit GRC Dump," if (ep->conn && ep->conn->cls_conn &&
" NW/PCIe trace, driver msgs to developers" ep->conn->cls_conn->dd_data) {
" for analysis\n"); struct iscsi_conn *conn = ep->conn->cls_conn->dd_data;
return 1;
/* Must suspend all rx queue activity for this ep */
set_bit(ISCSI_SUSPEND_BIT, &conn->suspend_rx);
}
/* CONN_DISCONNECT timeout may or may not be an issue depending
* on what transcribed in TCP layer, different targets behave
* differently
*/
printk(KERN_ALERT "bnx2i (%s): - WARN - CONN_DISCON timed out, "
"please submit GRC Dump, NW/PCIe trace, "
"driver msgs to developers for analysis\n",
hba->netdev->name);
} }
ep->state = EP_STATE_CLEANUP_START; ep->state = EP_STATE_CLEANUP_START;
......
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