Return-Path: Message-Id: <20130813155833.238374305@goodmis.org> Date: Tue, 13 Aug 2013 11:57:55 -0400 From: Steven Rostedt To: linux-kernel@vger.kernel.org, stable@vger.kernel.org Cc: Rick Macklem , "J. Bruce Fields" Subject: [61/88] nfsd4: fix decoding of compounds across page boundaries References: <20130813155654.069291373@goodmis.org> Content-Disposition: inline; filename=0061-nfsd4-fix-decoding-of-compounds-across-page-boundari.patch Sender: linux-kernel-owner@vger.kernel.org List-ID: 3.6.11.7-rc1 stable review patch. If anyone has any objections, please let me know. ------------------ From: "J. Bruce Fields" [ Upstream commit 247500820ebd02ad87525db5d9b199e5b66f6636 ] 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: Rick Macklem Signed-off-by: J. Bruce Fields Signed-off-by: Steven Rostedt --- fs/nfsd/nfs4xdr.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/fs/nfsd/nfs4xdr.c b/fs/nfsd/nfs4xdr.c index 348937b..1f43627 100644 --- a/fs/nfsd/nfs4xdr.c +++ b/fs/nfsd/nfs4xdr.c @@ -161,8 +161,8 @@ static __be32 *read_buf(struct nfsd4_compoundargs *argp, u32 nbytes) */ memcpy(p, argp->p, avail); /* step to next page */ - argp->p = page_address(argp->pagelist[0]); argp->pagelist++; + argp->p = page_address(argp->pagelist[0]); if (argp->pagelen < PAGE_SIZE) { argp->end = argp->p + (argp->pagelen>>2); argp->pagelen = 0; -- 1.7.10.4