From: Michael S. Tsirkin Date: Mon, 4 Sep 2006 07:58:13 +0000 (+0300) Subject: IB/sdp: fix a crash when child is disconnected while parent is being destroyed X-Git-Tag: v4.1.12-92~264^2~5^2~380 X-Git-Url: https://www.infradead.org/git/?a=commitdiff_plain;h=82ca7118592004a5cb638deb23aa876a48720ac6;p=users%2Fjedix%2Flinux-maple.git IB/sdp: fix a crash when child is disconnected while parent is being destroyed 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 10f25cfc9b84d..a0a14fbe6c6c1 100644 --- a/drivers/infiniband/ulp/sdp/sdp_cma.c +++ b/drivers/infiniband/ulp/sdp/sdp_cma.c @@ -487,6 +487,7 @@ int sdp_cma_handler(struct rdma_cm_id *id, struct rdma_cm_event *event) lock_sock(parent); if (!sdp_sk(parent)->id) { /* TODO: look at SOCK_DEAD? */ sdp_dbg(sk, "parent is going away.\n"); + child = NULL; goto done; } if (!list_empty(&sdp_sk(child)->backlog_queue))