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>
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)
if (ic->i_recvs)
rds_ib_recv_clear_ring(ic);
+ rdma_destroy_id(ic->i_cm_id);
+
/*
* Move connection back to the nodev list.
*/