summaryrefslogtreecommitdiffstats
path: root/net/rds
diff options
context:
space:
mode:
authorSantosh Shilimkar <ssantosh@kernel.org>2015-08-22 15:45:32 -0700
committerDavid S. Miller <davem@davemloft.net>2015-08-25 13:35:31 -0700
commit1c3be624f40acd6f2bd0f22ade081ac2467e8617 (patch)
tree6ac790494da86e1b1a25adc179aefcb81546bf25 /net/rds
parent5c240fa2ab394af1dbde280e00cc038cbc7f0409 (diff)
downloadop-kernel-dev-1c3be624f40acd6f2bd0f22ade081ac2467e8617.zip
op-kernel-dev-1c3be624f40acd6f2bd0f22ade081ac2467e8617.tar.gz
RDS: Don't destroy the rdma id until after we're done using it
During connection resets, we are destroying the rdma id too soon. We can't destroy it when it is still in use. So lets move rdma_destroy_id() after we clear the rings. Reviewed-by: Ajaykumar Hotchandani <ajaykumar.hotchandani@oracle.com> Signed-off-by: Santosh Shilimkar <ssantosh@kernel.org> Signed-off-by: Santosh Shilimkar <santosh.shilimkar@oracle.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/rds')
-rw-r--r--net/rds/ib_cm.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/net/rds/ib_cm.c b/net/rds/ib_cm.c
index 04243dd..d150bb4 100644
--- a/net/rds/ib_cm.c
+++ b/net/rds/ib_cm.c
@@ -647,7 +647,6 @@ void rds_ib_conn_shutdown(struct rds_connection *conn)
ib_destroy_cq(ic->i_send_cq);
if (ic->i_recv_cq)
ib_destroy_cq(ic->i_recv_cq);
- rdma_destroy_id(ic->i_cm_id);
/* then free the resources that ib callbacks use */
if (ic->i_send_hdrs)
@@ -673,6 +672,8 @@ void rds_ib_conn_shutdown(struct rds_connection *conn)
if (ic->i_recvs)
rds_ib_recv_clear_ring(ic);
+ rdma_destroy_id(ic->i_cm_id);
+
/*
* Move connection back to the nodev list.
*/
OpenPOWER on IntegriCloud