]> git.baikalelectronics.ru Git - kernel.git/commit
nfsd4: disallow ALLOCATE with special stateids
authorJ. Bruce Fields <bfields@redhat.com>
Fri, 3 Apr 2015 20:24:27 +0000 (16:24 -0400)
committerJ. Bruce Fields <bfields@redhat.com>
Tue, 21 Apr 2015 19:44:06 +0000 (15:44 -0400)
commitbb65d43caa379f638df2b88952538cbe91c87796
tree03b162597644cdb4e5321b2416a8922768f34017
parentee93e6eafd1b61fa6abd827ca02469495acead51
nfsd4: disallow ALLOCATE with special stateids

vfs_fallocate will hit a NULL dereference if the client tries an
ALLOCATE or DEALLOCATE with a special stateid.  Fix that.  (We also
depend on the open to have broken any conflicting leases or delegations
for us.)

(If it turns out we need to allow special stateid's then we could do a
temporary open here in the special-stateid case, as we do for read and
write.  For now I'm assuming it's not necessary.)

Fixes: ca9e2002111c "nfsd: Add ALLOCATE support"
Cc: stable@vger.kernel.org
Cc: Anna Schumaker <Anna.Schumaker@Netapp.com>
Signed-off-by: J. Bruce Fields <bfields@redhat.com>
fs/nfsd/nfs4proc.c