]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
nfsd: eliminate an unnecessary acl size limit
authorJ. Bruce Fields <bfields@redhat.com>
Thu, 29 Aug 2019 01:13:45 +0000 (21:13 -0400)
committerJ. Bruce Fields <bfields@redhat.com>
Thu, 29 Aug 2019 01:13:45 +0000 (21:13 -0400)
commit2b86e3aaf993a3ea6c73dfcf86143061a40c62e6
tree3dabfa610c67bc48c09313eab9a1c60092e45f10
parent9d60d93198c62ac3b3e59e8bba7079646c972a4c
nfsd: eliminate an unnecessary acl size limit

We're unnecessarily limiting the size of an ACL to less than what most
filesystems will support.  Some users do hit the limit and it's
confusing and unnecessary.

It still seems prudent to impose some limit on the number of ACEs the
client gives us before passing it straight to kmalloc().  So, let's just
limit it to the maximum number that would be possible given the amount
of data left in the argument buffer.

That will still leave one limit beyond whatever the filesystem imposes:
the client and server negotiate a limit on the size of a request, which
we have to respect.

But we're no longer imposing any additional arbitrary limit.

struct nfs4_ace is 20 bytes on my system and the maximum call size we'll
negotiate is about a megabyte, so in practice this is limiting the
allocation here to about a megabyte.

Reported-by: "de Vandiere, Louis" <louis.devandiere@atos.net>
Signed-off-by: J. Bruce Fields <bfields@redhat.com>
fs/nfsd/acl.h
fs/nfsd/nfs4xdr.c