Commit 2133bae1 authored by NeilBrown's avatar NeilBrown Committed by Chris Wright

[PATCH] knfsd: rpc: fix server-side wrapping of krb5i replies

It's not necessarily correct to assume that the xdr_buf used to hold the
server's reply must have page data whenever it has tail data.

And there's no need for us to deal with that case separately anyway.
Acked-by: default avatar"J. Bruce Fields" <bfields@citi.umich.edu>
Signed-off-by: default avatarNeil Brown <neilb@suse.de>
Signed-off-by: default avatarChris Wright <chrisw@sous-sol.org>
parent 2ef502b3
...@@ -1196,13 +1196,7 @@ svcauth_gss_wrap_resp_integ(struct svc_rqst *rqstp) ...@@ -1196,13 +1196,7 @@ svcauth_gss_wrap_resp_integ(struct svc_rqst *rqstp)
if (xdr_buf_subsegment(resbuf, &integ_buf, integ_offset, if (xdr_buf_subsegment(resbuf, &integ_buf, integ_offset,
integ_len)) integ_len))
BUG(); BUG();
if (resbuf->page_len == 0 if (resbuf->tail[0].iov_base == NULL) {
&& resbuf->head[0].iov_len + RPC_MAX_AUTH_SIZE
< PAGE_SIZE) {
BUG_ON(resbuf->tail[0].iov_len);
/* Use head for everything */
resv = &resbuf->head[0];
} else if (resbuf->tail[0].iov_base == NULL) {
if (resbuf->head[0].iov_len + RPC_MAX_AUTH_SIZE > PAGE_SIZE) if (resbuf->head[0].iov_len + RPC_MAX_AUTH_SIZE > PAGE_SIZE)
goto out_err; goto out_err;
resbuf->tail[0].iov_base = resbuf->head[0].iov_base resbuf->tail[0].iov_base = resbuf->head[0].iov_base
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment