]> www.infradead.org Git - users/jedix/linux-maple.git/commitdiff
CMA should check backlog_queue, not accept_queue, since accept_queue could be changed...
authorMichael S. Tsirkin <mst@mellanox.co.il>
Tue, 29 Aug 2006 10:13:11 +0000 (13:13 +0300)
committerMukesh Kacker <mukesh.kacker@oracle.com>
Tue, 6 Oct 2015 12:03:58 +0000 (05:03 -0700)
Signed-off-by: Michael S. Tsirkin <mst@mellanox.co.il>
drivers/infiniband/ulp/sdp/sdp_cma.c

index eb670eee0378c5ac27a3d6a3c720048435d0cc4f..10f25cfc9b84d00ac59b8be742c395526149274d 100644 (file)
@@ -489,9 +489,10 @@ int sdp_cma_handler(struct rdma_cm_id *id, struct rdma_cm_event *event)
                        sdp_dbg(sk, "parent is going away.\n");
                        goto done;
                }
-               list_del_init(&sdp_sk(child)->backlog_queue);
-               if (!list_empty(&sdp_sk(child)->accept_queue))
-                       child = NULL; /* Don't kill the child in accept queue */
+               if (!list_empty(&sdp_sk(child)->backlog_queue))
+                       list_del_init(&sdp_sk(child)->backlog_queue);
+               else
+                       child = NULL;
 done:
                release_sock(parent);
                if (child)