I have the following issue: The IB driver can't be unloaded after running applications over RDS. I saw that the 'dev_remove' counter does not reach 0 value on the passive side (after connection establishment).

Please review the following patch:

CMA: Enable conn_id remove on the passive side after
connection establishment.

Signed-off-by: Vladimir Sokolovsky <[EMAIL PROTECTED]>

Reviewed-by: Sean Hefty <[EMAIL PROTECTED]>

---

Roland, please queue this fix for 2.6.25. I don't think this fix is needed for 2.6.24. The bug only occurs during device removal if there is an established connection on the passive side. The only upstream call to rdma_listen() is to export the functionality to userspace, and device removal is restricted if the current libraries are being used.

Without this patch, the hang will occur every time, so our testing just hasn't hit this yet.

diff --git a/drivers/infiniband/core/cma.c b/drivers/infiniband/core/cma.c
index 0751697..656d6df 100644
--- a/drivers/infiniband/core/cma.c
+++ b/drivers/infiniband/core/cma.c
@@ -1122,8 +1122,10 @@ static int cma_req_handler(struct ib_cm_id *cm_id, struct ib_cm_event *ib_event)
        cm_id->cm_handler = cma_ib_handler;

        ret = conn_id->id.event_handler(&conn_id->id, &event);
-       if (!ret)
+       if (!ret) {
+               cma_enable_remove(conn_id);
                goto out;
+       }

        /* Destroy the CM ID by returning a non-zero value. */
        conn_id->cm_id.ib = NULL;

_______________________________________________
general mailing list
[email protected]
http://lists.openfabrics.org/cgi-bin/mailman/listinfo/general

To unsubscribe, please visit http://openib.org/mailman/listinfo/openib-general

_______________________________________________
general mailing list
[email protected]
http://lists.openfabrics.org/cgi-bin/mailman/listinfo/general

To unsubscribe, please visit http://openib.org/mailman/listinfo/openib-general

Reply via email to