projects
/
GitHub
/
mt8127
/
android_kernel_alcatel_ttab.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
5a02ab7
)
SUNRPC: Remove resource leak in svc_rdma_send_error()
author
Jesper Juhl
<jj@chaosbits.net>
Sat, 22 Jan 2011 21:40:20 +0000
(22:40 +0100)
committer
J. Bruce Fields
<bfields@redhat.com>
Thu, 17 Mar 2011 18:38:03 +0000
(14:38 -0400)
We leak the memory allocated to 'ctxt' when we return after
'ib_dma_mapping_error()' returns !=0.
Signed-off-by: Jesper Juhl <jj@chaosbits.net>
Signed-off-by: J. Bruce Fields <bfields@redhat.com>
net/sunrpc/xprtrdma/svc_rdma_transport.c
patch
|
blob
|
blame
|
history
diff --git
a/net/sunrpc/xprtrdma/svc_rdma_transport.c
b/net/sunrpc/xprtrdma/svc_rdma_transport.c
index 9df1eadc912a837c8863bd4a69733a23dbbab134..1a10dcd999ea9008b5069582a64867a44766cd15 100644
(file)
--- a/
net/sunrpc/xprtrdma/svc_rdma_transport.c
+++ b/
net/sunrpc/xprtrdma/svc_rdma_transport.c
@@
-1335,6
+1335,7
@@
void svc_rdma_send_error(struct svcxprt_rdma *xprt, struct rpcrdma_msg *rmsgp,
p, 0, length, DMA_FROM_DEVICE);
if (ib_dma_mapping_error(xprt->sc_cm_id->device, ctxt->sge[0].addr)) {
put_page(p);
+ svc_rdma_put_context(ctxt, 1);
return;
}
atomic_inc(&xprt->sc_dma_used);