linux-nfs.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "J. Bruce Fields" <bfields@fieldses.org>
To: Trond Myklebust <trond.myklebust@primarydata.com>
Cc: Weston Andros Adamson <dros@netapp.com>,
	Trond.Myklebust@netapp.com,
	Linux NFS Mailing List <linux-nfs@vger.kernel.org>
Subject: Re: [PATCH] NFSv4: fix getacl ERANGE for some ACL buffer sizes
Date: Wed, 23 Dec 2015 11:58:49 -0500	[thread overview]
Message-ID: <20151223165849.GA27432@fieldses.org> (raw)
In-Reply-To: <CAHQdGtQZwpa7kLypWjXrqDXWLvozErcCvEwbro_h1Kk7sGTYRw@mail.gmail.com>

On Mon, Dec 14, 2015 at 06:27:20PM -0500, Trond Myklebust wrote:
> On Mon, Dec 14, 2015 at 5:21 PM, J. Bruce Fields <bfields@fieldses.org> wrote:
> > From: Weston Andros Adamson <dros@netapp.com>
> >
> > Fix a bug where getxattr returns ERANGE when the attr buffer
> > length is close enough to the nearest PAGE_SIZE multiple that adding
> > the extra bytes leaves too little room for the ACL buffer.
> >
> > Besides storing the ACL buffer, the getacl decoder uses the inline
> > pages for the attr bitmap and buffer length. __nfs4_get_acl_uncached
> > must allocate enough page space for all of the data to be decoded.
> >
> > This patch uses xdr_partial_copy_from_skb to allocate any needed
> > pages past the first one. This allows the client to always cache the acl
> > on the first getacl call and not just if it fits in one page.
> >
> > Signed-off-by: Weston Andros Adamson <dros@netapp.com>
> > Signed-off-by: J. Bruce Fields <bfields@redhat.com>
> 
> The thread ends with:
> 
> "Indeed, buf->page_len is still set to the maximum number of bytes in
> the pages array (set by xdr_inline_pages to tell xdr layer the max
> allocation size), and not the number of bytes that are actually
> present.
> 
> Working on a fix.
> 
> -dros"

Dros, do you have a reliable reproducer for the BUG you were seeing?
I'm not having any luck.

--b.

  parent reply	other threads:[~2015-12-23 16:58 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-11-21 21:20 [PATCH v2] NFSv4: fix getacl ERANGE for some ACL buffer sizes Weston Andros Adamson
2013-12-10 18:13 ` Trond Myklebust
2013-12-10 19:11   ` Weston Andros Adamson
2013-12-10 19:19     ` Trond Myklebust
2013-12-10 20:10       ` Weston Andros Adamson
2013-12-11 20:29         ` Weston Andros Adamson
2015-12-14 22:18 ` J. Bruce Fields
2015-12-14 22:21   ` [PATCH] " J. Bruce Fields
2015-12-14 23:27     ` Trond Myklebust
2015-12-15 14:04       ` J. Bruce Fields
2015-12-23 16:58       ` J. Bruce Fields [this message]
2015-12-24  1:37         ` Jeff Layton
  -- strict thread matches above, loose matches on Subject: below --
2013-11-15 15:02 Weston Andros Adamson
2013-11-16 19:15 ` Weston Andros Adamson
2013-11-16 20:12   ` Myklebust, Trond
2013-11-21 14:33     ` Weston Andros Adamson
2013-11-21 14:56       ` Myklebust, Trond
2013-11-21 15:38         ` Weston Andros Adamson

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20151223165849.GA27432@fieldses.org \
    --to=bfields@fieldses.org \
    --cc=Trond.Myklebust@netapp.com \
    --cc=dros@netapp.com \
    --cc=linux-nfs@vger.kernel.org \
    --cc=trond.myklebust@primarydata.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).