Commit ee7255ada313a6db99be47ce174b0bfb8295a041

Authored by Anish Bhatt
Committed by David S. Miller
1 parent ffb1388a36

cxgb4i : Don't block unload/cxgb4 unload when remote closes TCP connection

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>

Showing 2 changed files with 3 additions and 1 deletions Side-by-side Diff

drivers/scsi/cxgbi/cxgb4i/cxgb4i.c
... ... @@ -828,6 +828,8 @@
828 828 if (status == CPL_ERR_RTX_NEG_ADVICE)
829 829 goto rel_skb;
830 830  
  831 + module_put(THIS_MODULE);
  832 +
831 833 if (status && status != CPL_ERR_TCAM_FULL &&
832 834 status != CPL_ERR_CONN_EXIST &&
833 835 status != CPL_ERR_ARP_MISS)
drivers/scsi/cxgbi/libcxgbi.c
... ... @@ -816,7 +816,7 @@
816 816 read_lock_bh(&csk->callback_lock);
817 817 if (csk->user_data)
818 818 iscsi_conn_failure(csk->user_data,
819   - ISCSI_ERR_CONN_FAILED);
  819 + ISCSI_ERR_TCP_CONN_CLOSE);
820 820 read_unlock_bh(&csk->callback_lock);
821 821 }
822 822 }