diff options
author | Trond Myklebust <Trond.Myklebust@netapp.com> | 2005-06-22 13:16:19 -0400 |
---|---|---|
committer | Trond Myklebust <Trond.Myklebust@netapp.com> | 2005-06-22 16:07:02 -0400 |
commit | 334ccfd545bba9690515f2c5c167d5adb161989b (patch) | |
tree | 8a06af4d40c711c578adc36d9afd3200a88a2689 /net/sunrpc/clnt.c | |
parent | d05fdb0cec75415b2d9eb95748386e67414e49c3 (diff) |
[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>
Diffstat (limited to 'net/sunrpc/clnt.c')
-rw-r--r-- | net/sunrpc/clnt.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/net/sunrpc/clnt.c b/net/sunrpc/clnt.c index 02bc029d46fe..209aaf595695 100644 --- a/net/sunrpc/clnt.c +++ b/net/sunrpc/clnt.c | |||
@@ -957,7 +957,9 @@ call_header(struct rpc_task *task) | |||
957 | *p++ = htonl(clnt->cl_prog); /* program number */ | 957 | *p++ = htonl(clnt->cl_prog); /* program number */ |
958 | *p++ = htonl(clnt->cl_vers); /* program version */ | 958 | *p++ = htonl(clnt->cl_vers); /* program version */ |
959 | *p++ = htonl(task->tk_msg.rpc_proc->p_proc); /* procedure */ | 959 | *p++ = htonl(task->tk_msg.rpc_proc->p_proc); /* procedure */ |
960 | return rpcauth_marshcred(task, p); | 960 | p = rpcauth_marshcred(task, p); |
961 | req->rq_slen = xdr_adjust_iovec(&req->rq_svec[0], p); | ||
962 | return p; | ||
961 | } | 963 | } |
962 | 964 | ||
963 | /* | 965 | /* |