]> www.infradead.org Git - users/jedix/linux-maple.git/commitdiff
IB/sdp: do not kill the child socket in accept queue
authorMichael S. Tsirkin <mst@mellanox.co.il>
Sun, 27 Aug 2006 09:13:18 +0000 (12:13 +0300)
committerMukesh Kacker <mukesh.kacker@oracle.com>
Tue, 6 Oct 2015 12:03:57 +0000 (05:03 -0700)
Signed-off-by: Michael S. Tsirkin <mst@mellanox.co.il>
drivers/infiniband/ulp/sdp/sdp_cma.c

index 12bff966687099987400f01f1feb79b1cfa57726..eb670eee0378c5ac27a3d6a3c720048435d0cc4f 100644 (file)
@@ -475,8 +475,7 @@ int sdp_cma_handler(struct rdma_cm_id *id, struct rdma_cm_event *event)
                id->qp = NULL;
                id->context = NULL;
                parent = sdp_sk(sk)->parent;
-               if (!parent)
-                       sdp_reset_sk(sk, rc);
+               sdp_reset_sk(sk, rc);
        }
 
        release_sock(sk);
@@ -491,13 +490,12 @@ int sdp_cma_handler(struct rdma_cm_id *id, struct rdma_cm_event *event)
                        goto done;
                }
                list_del_init(&sdp_sk(child)->backlog_queue);
-               if (!list_empty(&sdp_sk(child)->accept_queue)) {
-                       list_del_init(&sdp_sk(child)->accept_queue);
-                       sk_acceptq_removed(parent);
-               }
+               if (!list_empty(&sdp_sk(child)->accept_queue))
+                       child = NULL; /* Don't kill the child in accept queue */
 done:
                release_sock(parent);
-               sk_common_release(child);
+               if (child)
+                       sk_common_release(child);
        }
        return rc;
 }