[openib-general] Re: SPAM: [PATCH] [RFC] - dapl - dat_ep_free() can return without freeing the endpoint

Sean Hefty mshefty at ichips.intel.com
Tue Apr 4 15:12:58 PDT 2006


James Lentini wrote:
> /* ... here */
> 
>           if (cm_id) {
>                   if (cm_id->qp)
>                           rdma_destroy_qp(cm_id);
>                   rdma_destroy_id(cm_id);
>           }
>           dapl_os_free(conn, sizeof(*conn));
>   }
> 
> Destroying the cm_id while in a callback would be bad.

rdma_destroy_id() will block if a callback is in progress.  The issue is making 
sure that this routine is not called from the callback thread.

There shouldn't be any issue calling rdma_destroy_qp() regardless of if we're in 
a callback or not though.  So, the fix may be to always call rdma_destroy_qp() 
somewhere in this call path.

- Sean



More information about the general mailing list