浏览代码

IB/cm: Send no match if a SIDR REQ does not match a listen

If a SIDR REQ does not match a listen, we should reply with status
value 1 (service ID not supported), rather than dropping through to
the default case of status 2 (rejected by service provider).

Doing this also fixes a bug where the cm_id_priv is removed from the
remote_sidr_table twice.

Signed-off-by: Sean Hefty <sean.hefty@intel.com>
Signed-off-by: Roland Dreier <rolandd@cisco.com>
Sean Hefty 18 年之前
父节点
当前提交
6164c8cd13
共有 1 个文件被更改,包括 1 次插入2 次删除
  1. 1 2
      drivers/infiniband/core/cm.c

+ 1 - 2
drivers/infiniband/core/cm.c

@@ -2808,9 +2808,8 @@ static int cm_sidr_req_handler(struct cm_work *work)
 					sidr_req_msg->service_id,
 					sidr_req_msg->private_data);
 	if (!cur_cm_id_priv) {
-		rb_erase(&cm_id_priv->sidr_id_node, &cm.remote_sidr_table);
 		spin_unlock_irq(&cm.lock);
-		/* todo: reply with no match */
+		cm_reject_sidr_req(cm_id_priv, IB_SIDR_UNSUPPORTED);
 		goto out; /* No match. */
 	}
 	atomic_inc(&cur_cm_id_priv->refcount);