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

Commit 30548c7e authored by Trond Myklebust's avatar Trond Myklebust Committed by Sasha Levin
Browse files

SUNRPC: Fix a memory leak in the backchannel code



[ Upstream commit 88de6af24f2b48b06c514d3c3d0a8f22fafe30bd ]

req->rq_private_buf isn't initialised when xprt_setup_backchannel calls
xprt_free_allocation.

Fixes: fb7a0b9a ("nfs41: New backchannel helper routines")
Cc: stable@vger.kernel.org
Signed-off-by: default avatarTrond Myklebust <trond.myklebust@primarydata.com>
Signed-off-by: default avatarSasha Levin <sasha.levin@oracle.com>
parent d5057382
Loading
Loading
Loading
Loading
+1 −1
Original line number Original line Diff line number Diff line
@@ -60,7 +60,7 @@ static void xprt_free_allocation(struct rpc_rqst *req)


	dprintk("RPC:        free allocations for req= %p\n", 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));
	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);
	free_page((unsigned long)xbufp->head[0].iov_base);
	xbufp = &req->rq_snd_buf;
	xbufp = &req->rq_snd_buf;
	free_page((unsigned long)xbufp->head[0].iov_base);
	free_page((unsigned long)xbufp->head[0].iov_base);