svcrdma: Add put of connection ESTABLISHED reference in rdma_cma_handler
authorTom Tucker <tom@opengridcomputing.com>
Thu, 24 Apr 2008 19:17:21 +0000 (14:17 -0500)
committerTom Tucker <tom@opengridcomputing.com>
Mon, 19 May 2008 12:33:46 +0000 (07:33 -0500)
The svcrdma transport takes a reference when it gets the ESTABLISHED
event from the provider. This reference is supposed to be removed when
the DISCONNECT event is received, however, the call to svc_xprt_put
was missing in the switch statement. This results in the memory
associated with the transport never being freed.

Signed-off-by: Tom Tucker <tom@opengridcomputing.com>
net/sunrpc/xprtrdma/svc_rdma_transport.c

index 17f036b23a965e2eca4c32662a784f880d753e49..4bf8b5ad1675a34ab7e0d482071b397be7844966 100644 (file)
@@ -630,6 +630,7 @@ static int rdma_cma_handler(struct rdma_cm_id *cma_id,
                if (xprt) {
                        set_bit(XPT_CLOSE, &xprt->xpt_flags);
                        svc_xprt_enqueue(xprt);
+                       svc_xprt_put(xprt);
                }
                break;
        case RDMA_CM_EVENT_DEVICE_REMOVAL: