Comment 13 for bug 562913

Revision history for this message
J. Bruce Fields (bfields-fieldses) wrote : Re: [stable] nfs: fix acl decoding

On Tue, Aug 03, 2010 at 02:37:18PM +0800, Jeremy Kerr wrote:
> Hi Greg,
>
> Looks like this fixes an issue on 2.6.32.17 -
> https://bugs.edge.launchpad.net/ubuntu/+source/linux/+bug/562913 . The
> patch has hit mainline (as of 2.6.33, in commit
> d327cf7449e6fd5cbac784c641770e9366faa386), but has missed stable.
>
> Bruce - let me know if there's any reason this shouldn't go in.

Apologies, yes, I think it should have.

--b.

>
> Please consider for inclusion in the 2.6.32.y stable series.
>
> Regards,
>
>
> Jeremy
>
>
> >From 394cc62815fdac2b3effe952588630c8c3e0629f Mon Sep 17 00:00:00 2001
> From: J. Bruce Fields <email address hidden>
> Date: Thu, 3 Dec 2009 08:10:17 -0500
> Subject: [PATCH] Re: acl trouble after upgrading ubuntu
>
> Subject: [PATCH] nfs: fix acl decoding
>
> Commit 28f566942c6b1d929f5e240e69e7081b77b238d3 "NFS: use dynamically
> computed compound_hdr.replen for xdr_inline_pages offset" accidentally
> changed the amount of space to allow for the acl reply, resulting in an
> IO error on attempts to get an acl.
>
> Reported-by: Paul Rudin <email address hidden>
> Cc: Benny Halevy <email address hidden>
> Signed-off-by: J. Bruce Fields <email address hidden>
> Signed-off-by: Trond Myklebust <email address hidden>
> ---
> fs/nfs/nfs4xdr.c | 2 +-
> 1 files changed, 1 insertions(+), 1 deletions(-)
>
> diff --git a/fs/nfs/nfs4xdr.c b/fs/nfs/nfs4xdr.c
> index 5ec74cd..e81b2bf 100644
> --- a/fs/nfs/nfs4xdr.c
> +++ b/fs/nfs/nfs4xdr.c
> @@ -2096,7 +2096,7 @@ nfs4_xdr_enc_getacl(struct rpc_rqst *req, __be32 *p,
> encode_compound_hdr(&xdr, req, &hdr);
> encode_sequence(&xdr, &args->seq_args, &hdr);
> encode_putfh(&xdr, args->fh, &hdr);
> - replen = hdr.replen + nfs4_fattr_bitmap_maxsz + 1;
> + replen = hdr.replen + op_decode_hdr_maxsz + nfs4_fattr_bitmap_maxsz + 1;
> encode_getattr_two(&xdr, FATTR4_WORD0_ACL, 0, &hdr);
>
> xdr_inline_pages(&req->rq_rcv_buf, replen << 2,
> --
> 1.7.0.4
>
>
>