Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 05a0826a authored by Tom Tucker's avatar Tom Tucker
Browse files

svcrdma: Free context on ib_post_recv error



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: default avatarTom Tucker <tom@opengridcomputing.com>
parent 120693d1
Loading
Loading
Loading
Loading
+2 −0
Original line number Diff line number Diff line
@@ -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;
}