提交 24750082 编写于 作者: J J. Bruce Fields

nfsd4: fix decoding of compounds across page boundaries

A freebsd NFSv4.0 client was getting rare IO errors expanding a tarball.
A network trace showed the server returning BAD_XDR on the final getattr
of a getattr+write+getattr compound.  The final getattr started on a
page boundary.

I believe the Linux client ignores errors on the post-write getattr, and
that that's why we haven't seen this before.

Cc: stable@vger.kernel.org
Reported-by: NRick Macklem <rmacklem@uoguelph.ca>
Signed-off-by: NJ. Bruce Fields <bfields@redhat.com>
上级 99c41515
...@@ -167,8 +167,8 @@ static __be32 *read_buf(struct nfsd4_compoundargs *argp, u32 nbytes) ...@@ -167,8 +167,8 @@ static __be32 *read_buf(struct nfsd4_compoundargs *argp, u32 nbytes)
*/ */
memcpy(p, argp->p, avail); memcpy(p, argp->p, avail);
/* step to next page */ /* step to next page */
argp->p = page_address(argp->pagelist[0]);
argp->pagelist++; argp->pagelist++;
argp->p = page_address(argp->pagelist[0]);
if (argp->pagelen < PAGE_SIZE) { if (argp->pagelen < PAGE_SIZE) {
argp->end = argp->p + (argp->pagelen>>2); argp->end = argp->p + (argp->pagelen>>2);
argp->pagelen = 0; argp->pagelen = 0;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册