From: Michael S. Tsirkin Date: Tue, 29 Aug 2006 10:13:11 +0000 (+0300) Subject: CMA should check backlog_queue, not accept_queue, since accept_queue could be changed... X-Git-Tag: v4.1.12-92~264^2~5^2~381 X-Git-Url: https://www.infradead.org/git/?a=commitdiff_plain;h=f18b3697ca2a9720374c3a92d7109944de62a441;p=users%2Fjedix%2Flinux-maple.git CMA should check backlog_queue, not accept_queue, since accept_queue could be changed by accept(). Signed-off-by: Michael S. Tsirkin --- diff --git a/drivers/infiniband/ulp/sdp/sdp_cma.c b/drivers/infiniband/ulp/sdp/sdp_cma.c index eb670eee0378c..10f25cfc9b84d 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)