Thread (1 message) 1 message, 1 author, 2012-02-23

Re: [PATCH] iw_cm: reject connect requests if cmid is not in LISTEN

From: Roland Dreier <hidden>
Date: 2012-02-23 07:46:18

On Wed, Feb 22, 2012 at 1:43 PM, Steve Wise [off-list ref] wrote:
quoted hunk
diff --git a/drivers/infiniband/core/iwcm.c b/drivers/infiniband/core/iwcm.c
index 1a696f7..6847d76 100644
--- a/drivers/infiniband/core/iwcm.c
+++ b/drivers/infiniband/core/iwcm.c
@@ -631,6 +631,8 @@ static void cm_conn_req_handler(struct iwcm_id_private *listen_id_priv,
       spin_lock_irqsave(&listen_id_priv->lock, flags);
       if (listen_id_priv->state != IW_CM_STATE_LISTEN) {
               spin_unlock_irqrestore(&listen_id_priv->lock, flags);
+               iw_cm_reject(cm_id, NULL, 0);
+               iw_destroy_cm_id(cm_id);
               goto out;
       }
       spin_unlock_irqrestore(&listen_id_priv->lock, flags);
Thanks, this makes more sense to my brain at least.

I assume this works just as well in your testing? :)
--
To unsubscribe from this list: send the line "unsubscribe linux-rdma" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help