aboutsummaryrefslogtreecommitdiffstats
path: root/fs
diff options
context:
space:
mode:
authorJ. Bruce Fields <bfields@redhat.com>2014-01-28 16:05:15 -0500
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2014-05-06 10:55:29 -0400
commitf4a0a32b202fd49d255bfc689828f0a79d364866 (patch)
tree0db9d089a85aec39e91d12a9aae5ec6a84557e5d /fs
parentc5393b70f9229b3e68146c84888cbfc8be002d72 (diff)
nfsd4: buffer-length check for SUPPATTR_EXCLCREAT
commit de3997a7eeb9ea286b15879fdf8a95aae065b4f7 upstream. This was an omission from 8c18f2052e756e7d5dea712fc6e7ed70c00e8a39 "nfsd41: SUPPATTR_EXCLCREAT attribute". Cc: Benny Halevy <bhalevy@primarydata.com> Signed-off-by: J. Bruce Fields <bfields@redhat.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'fs')
-rw-r--r--fs/nfsd/nfs4xdr.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/fs/nfsd/nfs4xdr.c b/fs/nfsd/nfs4xdr.c
index 582321a978b0..d7ea1938cdee 100644
--- a/fs/nfsd/nfs4xdr.c
+++ b/fs/nfsd/nfs4xdr.c
@@ -2401,6 +2401,8 @@ out_acl:
2401 WRITE64(stat.ino); 2401 WRITE64(stat.ino);
2402 } 2402 }
2403 if (bmval2 & FATTR4_WORD2_SUPPATTR_EXCLCREAT) { 2403 if (bmval2 & FATTR4_WORD2_SUPPATTR_EXCLCREAT) {
2404 if ((buflen -= 16) < 0)
2405 goto out_resource;
2404 WRITE32(3); 2406 WRITE32(3);
2405 WRITE32(NFSD_SUPPATTR_EXCLCREAT_WORD0); 2407 WRITE32(NFSD_SUPPATTR_EXCLCREAT_WORD0);
2406 WRITE32(NFSD_SUPPATTR_EXCLCREAT_WORD1); 2408 WRITE32(NFSD_SUPPATTR_EXCLCREAT_WORD1);