Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 57087
b: refs/heads/master
c: d998ccc
h: refs/heads/master
i:
  57085: e0e9262
  57083: 99eb82f
  57079: 6bb69d6
  57071: 2a06e24
  57055: 8a48ba7
  57023: eb47503
  56959: 50ef9f1
  56831: d641ca0
v: v3
  • Loading branch information
Sean Hefty authored and Roland Dreier committed May 29, 2007
1 parent 5247795 commit c4afeac
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 12 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: ec56dc0b7f6c3fec20bbc2e98ff1a06edf2fc9b9
refs/heads/master: d998ccce020e2cfcf11c6b57503532930ede2894
25 changes: 14 additions & 11 deletions trunk/drivers/infiniband/core/cm.c
Original file line number Diff line number Diff line change
Expand Up @@ -1297,26 +1297,29 @@ static struct cm_id_private * cm_match_req(struct cm_work *work,

req_msg = (struct cm_req_msg *)work->mad_recv_wc->recv_buf.mad;

/* Check for duplicate REQ and stale connections. */
/* Check for possible duplicate REQ. */
spin_lock_irqsave(&cm.lock, flags);
timewait_info = cm_insert_remote_id(cm_id_priv->timewait_info);
if (!timewait_info)
timewait_info = cm_insert_remote_qpn(cm_id_priv->timewait_info);

if (timewait_info) {
cur_cm_id_priv = cm_get_id(timewait_info->work.local_id,
timewait_info->work.remote_id);
cm_cleanup_timewait(cm_id_priv->timewait_info);
spin_unlock_irqrestore(&cm.lock, flags);
if (cur_cm_id_priv) {
cm_dup_req_handler(work, cur_cm_id_priv);
cm_deref_id(cur_cm_id_priv);
} else
cm_issue_rej(work->port, work->mad_recv_wc,
IB_CM_REJ_STALE_CONN, CM_MSG_RESPONSE_REQ,
NULL, 0);
listen_cm_id_priv = NULL;
goto out;
}
return NULL;
}

/* Check for stale connections. */
timewait_info = cm_insert_remote_qpn(cm_id_priv->timewait_info);
if (timewait_info) {
cm_cleanup_timewait(cm_id_priv->timewait_info);
spin_unlock_irqrestore(&cm.lock, flags);
cm_issue_rej(work->port, work->mad_recv_wc,
IB_CM_REJ_STALE_CONN, CM_MSG_RESPONSE_REQ,
NULL, 0);
return NULL;
}

/* Find matching listen request. */
Expand Down

0 comments on commit c4afeac

Please sign in to comment.