Skip to content

Commit

Permalink
svcrdma: Free context on ib_post_recv error
Browse files Browse the repository at this point in the history
If there is an error posting the recv WR to the RQ, free the
context associated with the WR. This would leak a context when
asynchronous errors occurred on the transport while conccurent threads
were processing their RPC.

Signed-off-by: Tom Tucker <tom@opengridcomputing.com>
  • Loading branch information
Tom Tucker committed May 19, 2008
1 parent 120693d commit 05a0826
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions net/sunrpc/xprtrdma/svc_rdma_transport.c
Original file line number Diff line number Diff line change
Expand Up @@ -524,6 +524,8 @@ int svc_rdma_post_recv(struct svcxprt_rdma *xprt)
recv_wr.wr_id = (u64)(unsigned long)ctxt;

ret = ib_post_recv(xprt->sc_qp, &recv_wr, &bad_recv_wr);
if (ret)
svc_rdma_put_context(ctxt, 1);
return ret;
}

Expand Down

0 comments on commit 05a0826

Please sign in to comment.