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

Commit ee1a2c56 authored by Tom Talpey's avatar Tom Talpey Committed by Trond Myklebust
Browse files

SUNRPC: Fix a nfs4 over rdma transport oops



Prevent an RPC oops when freeing a dynamically allocated RDMA
buffer, used in certain special-case large metadata operations.

Signed-off-by: default avatarTom Talpey <tmt@netapp.com>
Signed-off-by: default avatarJames Lentini <jlentini@netapp.com>
Signed-off-by: default avatarTrond Myklebust <Trond.Myklebust@netapp.com>
parent af1b8c2f
Loading
Loading
Loading
Loading
+5 −1
Original line number Diff line number Diff line
@@ -614,6 +614,10 @@ xprt_rdma_free(void *buffer)
		return;

	req = container_of(buffer, struct rpcrdma_req, rl_xdr_buf[0]);
	if (req->rl_iov.length == 0) {	/* see allocate above */
		r_xprt = container_of(((struct rpcrdma_req *) req->rl_buffer)->rl_buffer,
				      struct rpcrdma_xprt, rx_buf);
	} else
		r_xprt = container_of(req->rl_buffer, struct rpcrdma_xprt, rx_buf);
	rep = req->rl_reply;