提交 ee1a2c56 编写于 作者: T Tom Talpey 提交者: Trond Myklebust

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: NTom Talpey <tmt@netapp.com>
Signed-off-by: NJames Lentini <jlentini@netapp.com>
Signed-off-by: NTrond Myklebust <Trond.Myklebust@netapp.com>
上级 af1b8c2f
......@@ -614,7 +614,11 @@ xprt_rdma_free(void *buffer)
return;
req = container_of(buffer, struct rpcrdma_req, rl_xdr_buf[0]);
r_xprt = container_of(req->rl_buffer, struct rpcrdma_xprt, rx_buf);
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;
dprintk("RPC: %s: called on 0x%p%s\n",
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册