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; -...@vger.kernel.org; linux- >r...@vger.kernel.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 majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html