From f18b3697ca2a9720374c3a92d7109944de62a441 Mon Sep 17 00:00:00 2001 From: "Michael S. Tsirkin" Date: Tue, 29 Aug 2006 13:13:11 +0300 Subject: [PATCH] CMA should check backlog_queue, not accept_queue, since accept_queue could be changed by accept(). Signed-off-by: Michael S. Tsirkin --- drivers/infiniband/ulp/sdp/sdp_cma.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/drivers/infiniband/ulp/sdp/sdp_cma.c b/drivers/infiniband/ulp/sdp/sdp_cma.c index eb670eee0378..10f25cfc9b84 100644 --- a/drivers/infiniband/ulp/sdp/sdp_cma.c +++ b/drivers/infiniband/ulp/sdp/sdp_cma.c @@ -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) -- 2.50.1