public inbox for linux-rdma@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH 02/02] RDMA/nes: listener destroyed during loopback setup crash
@ 2010-02-12 19:57 Faisal Latif
  2010-02-12 20:01 ` Sean Hefty
  0 siblings, 1 reply; 3+ messages in thread
From: Faisal Latif @ 2010-02-12 19:57 UTC (permalink / raw)
  To: Roland Dreier, -c, linux-rdma-u79uwXL29TY76Z2rM5mHXA

When listener is destroyed and where is MPA response pending for
loopback connection, the active side cm_node gets destroyed in
cm_event_connect_error() and again in nes_accept()/nes_reject().
Incrementing cm_node's refcount to not be destroyed by cm_event_connect_error().

Signed-off-by: Faisal Latif <faisal.latif-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org>
---
 drivers/infiniband/hw/nes/nes_cm.c |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)

diff --git a/drivers/infiniband/hw/nes/nes_cm.c b/drivers/infiniband/hw/nes/nes_cm.c
index debd92c..2a49ee4 100644
--- a/drivers/infiniband/hw/nes/nes_cm.c
+++ b/drivers/infiniband/hw/nes/nes_cm.c
@@ -1011,9 +1011,10 @@ static int mini_cm_dec_refcnt_listen(struct nes_cm_core *cm_core,
 					event.cm_info.loc_port =
 							 loopback->loc_port;
 					event.cm_info.cm_id = loopback->cm_id;
+					add_ref_cm_node(loopback);
+					loopback->state = NES_CM_STATE_CLOSED;
 					cm_event_connect_error(&event);
 					cm_node->state = NES_CM_STATE_LISTENER_DESTROYED;
-					loopback->state = NES_CM_STATE_CLOSED;
 
 					rem_ref_cm_node(cm_node->cm_core,
 							 cm_node);
-- 
1.5.3.3

--
To unsubscribe from this list: send the line "unsubscribe linux-rdma" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

^ permalink raw reply related	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2010-02-12 20:15 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-02-12 19:57 [PATCH 02/02] RDMA/nes: listener destroyed during loopback setup crash Faisal Latif
2010-02-12 20:01 ` Sean Hefty
     [not found]   ` <F76A888F6A4D47848B20E1F578081E61-Zpru7NauK7drdx17CPfAsdBPR1lH4CV8@public.gmane.org>
2010-02-12 20:15     ` Latif, Faisal

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox