Skip to content

Commit

Permalink
SUNRPC: Fix a memory leak in the backchannel code
Browse files Browse the repository at this point in the history
req->rq_private_buf isn't initialised when xprt_setup_backchannel calls
xprt_free_allocation.

Fixes: fb7a0b9 ("nfs41: New backchannel helper routines")
Cc: stable@vger.kernel.org
Signed-off-by: Trond Myklebust <trond.myklebust@primarydata.com>
  • Loading branch information
trondmypd committed Jun 2, 2015
1 parent 13985b1 commit 88de6af
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion net/sunrpc/backchannel_rqst.c
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ static void xprt_free_allocation(struct rpc_rqst *req)

dprintk("RPC: free allocations for req= %p\n", req);
WARN_ON_ONCE(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);
Expand Down

0 comments on commit 88de6af

Please sign in to comment.