From: Michael S. Tsirkin Date: Sun, 27 Aug 2006 09:13:18 +0000 (+0300) Subject: IB/sdp: do not kill the child socket in accept queue X-Git-Tag: v4.1.12-92~264^2~5^2~383 X-Git-Url: https://www.infradead.org/git/?a=commitdiff_plain;h=ecb2773c526578a704c20cb7c220113a1c1e2dc0;p=users%2Fjedix%2Flinux-maple.git IB/sdp: do not kill the child socket in accept queue 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 12bff96668709..eb670eee0378c 100644 --- a/drivers/infiniband/ulp/sdp/sdp_cma.c +++ b/drivers/infiniband/ulp/sdp/sdp_cma.c @@ -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; }