[openib-general] CM REP-REJ bug
Libor Michalek
libor at topspin.com
Fri Feb 25 17:01:05 PST 2005
Sean,
There's a problem with REJ response to REQ. The REJ handler
uses cm_acquire_id() to find the cm_id of the REQ, but it uses
rej_msg->local_comm_id to perform the lookup. In the REQ case the
cm_id does not have a remote_id with which to match the REJ.
Here's a possible patch.
-Libor
Signed-off-by: Libor Michalek <libor at topspin.com>
Index: infiniband/core/cm.c
===================================================================
--- infiniband/core/cm.c (revision 1922)
+++ infiniband/core/cm.c (working copy)
@@ -317,7 +317,8 @@
spin_lock_irqsave(&cm.lock, flags);
cm_id_priv = idr_find(&cm.local_id_table, (int) local_id);
if (cm_id_priv) {
- if (cm_id_priv->id.remote_id == remote_id)
+ if (cm_id_priv->id.remote_id == 0 ||
+ cm_id_priv->id.remote_id == remote_id)
atomic_inc(&cm_id_priv->refcount);
else
cm_id_priv = NULL;
More information about the general
mailing list