aboutsummaryrefslogtreecommitdiffstats
path: root/fs/nfsd
diff options
context:
space:
mode:
authorJ. Bruce Fields <bfields@redhat.com>2014-01-28 16:05:15 -0500
committerJ. Bruce Fields <bfields@redhat.com>2014-03-27 16:30:42 -0400
commitde3997a7eeb9ea286b15879fdf8a95aae065b4f7 (patch)
treea32f094a1426deb839384bef0a4e60add30423ca /fs/nfsd
parent1406b916f4a29d5f9660264a28ce609c8c77e7ae (diff)
nfsd4: buffer-length check for SUPPATTR_EXCLCREAT
This was an omission from 8c18f2052e756e7d5dea712fc6e7ed70c00e8a39 "nfsd41: SUPPATTR_EXCLCREAT attribute". Cc: Benny Halevy <bhalevy@primarydata.com> Cc: stable@vger.kernel.org Signed-off-by: J. Bruce Fields <bfields@redhat.com>
Diffstat (limited to 'fs/nfsd')
-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 63f2395c57ed..668bfe1fcdec 100644
--- a/fs/nfsd/nfs4xdr.c
+++ b/fs/nfsd/nfs4xdr.c
@@ -2483,6 +2483,8 @@ out_acl:
2483 goto out; 2483 goto out;
2484 } 2484 }
2485 if (bmval2 & FATTR4_WORD2_SUPPATTR_EXCLCREAT) { 2485 if (bmval2 & FATTR4_WORD2_SUPPATTR_EXCLCREAT) {
2486 if ((buflen -= 16) < 0)
2487 goto out_resource;
2486 WRITE32(3); 2488 WRITE32(3);
2487 WRITE32(NFSD_SUPPATTR_EXCLCREAT_WORD0); 2489 WRITE32(NFSD_SUPPATTR_EXCLCREAT_WORD0);
2488 WRITE32(NFSD_SUPPATTR_EXCLCREAT_WORD1); 2490 WRITE32(NFSD_SUPPATTR_EXCLCREAT_WORD1);