]> git.karo-electronics.de Git - mv-sheeva.git/commitdiff
RDMA/iwcm: Reject the connection when the cm_id is destroyed
authorSteve Wise <swise@opengridcomputing.com>
Wed, 9 Sep 2009 18:37:38 +0000 (11:37 -0700)
committerRoland Dreier <rolandd@cisco.com>
Wed, 9 Sep 2009 18:37:38 +0000 (11:37 -0700)
If the cm_id of a connect request is destroyed prior to the ULP
accepting or rejecting the connection, then the provider never cleans
up the connection.  The iwcm should explicitly reject these
connections if the cm_id is destroyed.

Signed-off-by: Steve Wise <swise@opengridcomputing.com>
Signed-off-by: Roland Dreier <rolandd@cisco.com>
drivers/infiniband/core/iwcm.c

index 8f9509e1ebf76494217b7d48f6b7bdef307ac3b4..55d093a36ae48a29a09877176b1448e279555d00 100644 (file)
@@ -362,6 +362,7 @@ static void destroy_cm_id(struct iw_cm_id *cm_id)
                 * In either case, must tell the provider to reject.
                 */
                cm_id_priv->state = IW_CM_STATE_DESTROYING;
+               cm_id->device->iwcm->reject(cm_id, NULL, 0);
                break;
        case IW_CM_STATE_CONN_SENT:
        case IW_CM_STATE_DESTROYING: