[PATCH] RPC: Ensure XDR iovec length is initialized correctly in call_header
Fix up call_header() so that it calls xdr_adjust_iovec(). Fix calculation of the scratch buffer length in xdr_init_encode(). Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
This commit is contained in:
@@ -957,7 +957,9 @@ call_header(struct rpc_task *task)
|
||||
*p++ = htonl(clnt->cl_prog); /* program number */
|
||||
*p++ = htonl(clnt->cl_vers); /* program version */
|
||||
*p++ = htonl(task->tk_msg.rpc_proc->p_proc); /* procedure */
|
||||
return rpcauth_marshcred(task, p);
|
||||
p = rpcauth_marshcred(task, p);
|
||||
req->rq_slen = xdr_adjust_iovec(&req->rq_svec[0], p);
|
||||
return p;
|
||||
}
|
||||
|
||||
/*
|
||||
|
Reference in New Issue
Block a user