cxgb4i : Don't block unload/cxgb4 unload when remote closes TCP connection
authorAnish Bhatt <anish@chelsio.com>
Wed, 19 Nov 2014 03:09:51 +0000 (19:09 -0800)
committerDavid S. Miller <davem@davemloft.net>
Wed, 19 Nov 2014 21:59:26 +0000 (16:59 -0500)
cxgb4i was returning wrong error and not releasing module reference if remote
end abruptly closed TCP connection. This prevents the cxgb4 network module from
being unloaded, further affecting other network drivers dependent on cxgb4

Sending to net as this affects all cxgb4 based network drivers.

Signed-off-by: Anish Bhatt <anish@chelsio.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/scsi/cxgbi/cxgb4i/cxgb4i.c
drivers/scsi/cxgbi/libcxgbi.c

index 3e0a0d315f72acc6b7088ded6d27465ff14b2840..f48f40ce9f87f39f3c6fb64bd2b437b22c992b38 100644 (file)
@@ -828,6 +828,8 @@ static void do_act_open_rpl(struct cxgbi_device *cdev, struct sk_buff *skb)
        if (status == CPL_ERR_RTX_NEG_ADVICE)
                goto rel_skb;
 
+       module_put(THIS_MODULE);
+
        if (status && status != CPL_ERR_TCAM_FULL &&
            status != CPL_ERR_CONN_EXIST &&
            status != CPL_ERR_ARP_MISS)
index 674d498b46ab0ba380655fa4e9649b3fabf5e49d..9d63853c5fce4bf4457504f3d1a1890a0ba51b09 100644 (file)
@@ -816,7 +816,7 @@ static void cxgbi_inform_iscsi_conn_closing(struct cxgbi_sock *csk)
                read_lock_bh(&csk->callback_lock);
                if (csk->user_data)
                        iscsi_conn_failure(csk->user_data,
-                                       ISCSI_ERR_CONN_FAILED);
+                                       ISCSI_ERR_TCP_CONN_CLOSE);
                read_unlock_bh(&csk->callback_lock);
        }
 }