[openib-general] [PATCH] fix for a bug in cma_ib_listen()

Steve Wise swise at opengridcomputing.com
Mon Oct 31 12:54:22 PST 2005


Fix for bug in cma_ib_listen().  

Set cm_id to NULL after destroying the listen ib_cm_id so rdma_destory_id() doesn't try and destroy it again later.

This fixes the crash I'm seeing when I destroy a cma_id after rdma_listen() fails...

Signed off by: Steve Wise <swise at opengridcomputing.com>


Index: cma.c
===================================================================
--- cma.c       (revision 3860)
+++ cma.c       (working copy)
@@ -713,8 +713,10 @@
 
        svc_id = cma_get_service_id(&id_priv->id.route.addr.src_addr);
        ret = ib_cm_listen(id_priv->cm_id, svc_id, 0);
-       if (ret)
+       if (ret) {
                ib_destroy_cm_id(id_priv->cm_id);
+               id_priv->cm_id = NULL;
+       }
 
        return ret;
 }




More information about the general mailing list