* [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
* RE: [PATCH 02/02] RDMA/nes: listener destroyed during loopback setup crash 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> 0 siblings, 1 reply; 3+ messages in thread From: Sean Hefty @ 2010-02-12 20:01 UTC (permalink / raw) To: Latif, Faisal, Roland Dreier, -c, linux-rdma-u79uwXL29TY76Z2rM5mHXA >@@ -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; It seems odd to increment a reference count in a function with the name 'dec_refcnt'. Is there a better name for mini_cm_dec_refcnt_listen? -- 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 [flat|nested] 3+ messages in thread
[parent not found: <F76A888F6A4D47848B20E1F578081E61-Zpru7NauK7drdx17CPfAsdBPR1lH4CV8@public.gmane.org>]
* RE: [PATCH 02/02] RDMA/nes: listener destroyed during loopback setup crash [not found] ` <F76A888F6A4D47848B20E1F578081E61-Zpru7NauK7drdx17CPfAsdBPR1lH4CV8@public.gmane.org> @ 2010-02-12 20:15 ` Latif, Faisal 0 siblings, 0 replies; 3+ messages in thread From: Latif, Faisal @ 2010-02-12 20:15 UTC (permalink / raw) To: Hefty, Sean, Roland Dreier, -c@vger.kernel.org, linux-rdma-u79uwXL29TY76Z2rM5mHXA@public.gmane.org The add_ref_cm_node() is not for listener node but for the active side node of a loopback connection. For loopback's active node, its refcount gets decremented in cm_event_connect_error(). This is a error handling case. Faisal >-----Original Message----- >From: Hefty, Sean >Sent: Friday, February 12, 2010 2:02 PM >To: Latif, Faisal; Roland Dreier; -c@vger.kernel.org; linux- >rdma-u79uwXL29TY76Z2rM5mHXA@public.gmane.org >Subject: RE: [PATCH 02/02] RDMA/nes: listener destroyed during loopback >setup crash > >>@@ -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; > >It seems odd to increment a reference count in a function with the name >'dec_refcnt'. Is there a better name for mini_cm_dec_refcnt_listen? -- 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 [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