]> 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)
commit9eec00ce73fc89dfee6821c629c18ab0a32e227b
tree03b162597644cdb4e5321b2416a8922768f34017
parent1ec5172a5f85d9864da4fe0176cf835e786bc7da
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: cabb8d2d599a "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