aboutsummaryrefslogtreecommitdiffstats
path: root/net
diff options
context:
space:
mode:
authorTrond Myklebust <trond.myklebust@primarydata.com>2015-06-01 15:10:25 -0400
committerBen Hutchings <ben@decadent.org.uk>2015-08-12 16:33:14 +0200
commitbd031759bcc0865938ecc52846a3f22f2a26ad8e (patch)
tree87f2d34abbcfaf8924f86a860c44dd6cef9c7e3d /net
parent4204f4baa75900dc53fa1b6d5363036298cd2a83 (diff)
downloadkernel_samsung_smdk4412-bd031759bcc0865938ecc52846a3f22f2a26ad8e.zip
kernel_samsung_smdk4412-bd031759bcc0865938ecc52846a3f22f2a26ad8e.tar.gz
kernel_samsung_smdk4412-bd031759bcc0865938ecc52846a3f22f2a26ad8e.tar.bz2
SUNRPC: Fix a memory leak in the backchannel code
commit 88de6af24f2b48b06c514d3c3d0a8f22fafe30bd upstream. req->rq_private_buf isn't initialised when xprt_setup_backchannel calls xprt_free_allocation. Fixes: fb7a0b9addbdb ("nfs41: New backchannel helper routines") Signed-off-by: Trond Myklebust <trond.myklebust@primarydata.com> [bwh: Backported to 3.2: adjust context] Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
Diffstat (limited to 'net')
-rw-r--r--net/sunrpc/backchannel_rqst.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/net/sunrpc/backchannel_rqst.c b/net/sunrpc/backchannel_rqst.c
index 3ad435a..b56f23e 100644
--- a/net/sunrpc/backchannel_rqst.c
+++ b/net/sunrpc/backchannel_rqst.c
@@ -59,7 +59,7 @@ static void xprt_free_allocation(struct rpc_rqst *req)
dprintk("RPC: free allocations for req= %p\n", req);
BUG_ON(test_bit(RPC_BC_PA_IN_USE, &req->rq_bc_pa_state));
- xbufp = &req->rq_private_buf;
+ xbufp = &req->rq_rcv_buf;
free_page((unsigned long)xbufp->head[0].iov_base);
xbufp = &req->rq_snd_buf;
free_page((unsigned long)xbufp->head[0].iov_base);