aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--net/sunrpc/clnt.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/net/sunrpc/clnt.c b/net/sunrpc/clnt.c
index 4216fe33204a..310873895578 100644
--- a/net/sunrpc/clnt.c
+++ b/net/sunrpc/clnt.c
@@ -1730,7 +1730,12 @@ call_allocate(struct rpc_task *task)
1730 req->rq_callsize = RPC_CALLHDRSIZE + (auth->au_cslack << 1) + 1730 req->rq_callsize = RPC_CALLHDRSIZE + (auth->au_cslack << 1) +
1731 proc->p_arglen; 1731 proc->p_arglen;
1732 req->rq_callsize <<= 2; 1732 req->rq_callsize <<= 2;
1733 req->rq_rcvsize = RPC_REPHDRSIZE + auth->au_rslack + proc->p_replen; 1733 /*
1734 * Note: the reply buffer must at minimum allocate enough space
1735 * for the 'struct accepted_reply' from RFC5531.
1736 */
1737 req->rq_rcvsize = RPC_REPHDRSIZE + auth->au_rslack + \
1738 max_t(size_t, proc->p_replen, 2);
1734 req->rq_rcvsize <<= 2; 1739 req->rq_rcvsize <<= 2;
1735 1740
1736 status = xprt->ops->buf_alloc(task); 1741 status = xprt->ops->buf_alloc(task);