summaryrefslogtreecommitdiffstats
path: root/fs/nfsd/export.c
diff options
context:
space:
mode:
authorKinglong Mee <kinglongmee@gmail.com>2014-05-24 11:26:49 +0800
committerJ. Bruce Fields <bfields@redhat.com>2014-05-30 17:32:24 -0400
commit1f53146da9cb2c941a3928320a6824d3b035455f (patch)
tree46e7a0dc2767f4df6baf37867465e445f748f1dd /fs/nfsd/export.c
parentf0db79d54b6c9f612fb2ef4f71ca8340edaf89f1 (diff)
downloadlinux-stable-1f53146da9cb2c941a3928320a6824d3b035455f.tar.gz
linux-stable-1f53146da9cb2c941a3928320a6824d3b035455f.tar.bz2
linux-stable-1f53146da9cb2c941a3928320a6824d3b035455f.zip
NFSD: Using type of uint32_t for ex_nflavors instead of int
ex_nflavors can't be negative number, just defined by uint32_t. Signed-off-by: Kinglong Mee <kinglongmee@gmail.com> Signed-off-by: J. Bruce Fields <bfields@redhat.com>
Diffstat (limited to 'fs/nfsd/export.c')
-rw-r--r--fs/nfsd/export.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/fs/nfsd/export.c b/fs/nfsd/export.c
index 263d30e7972e..788405107006 100644
--- a/fs/nfsd/export.c
+++ b/fs/nfsd/export.c
@@ -438,13 +438,14 @@ out_free_all:
static int secinfo_parse(char **mesg, char *buf, struct svc_export *exp)
{
- int listsize, err;
struct exp_flavor_info *f;
+ u32 listsize;
+ int err;
- err = get_int(mesg, &listsize);
+ err = get_uint(mesg, &listsize);
if (err)
return err;
- if (listsize < 0 || listsize > MAX_SECINFO_LIST)
+ if (listsize > MAX_SECINFO_LIST)
return -EINVAL;
for (f = exp->ex_flavors; f < exp->ex_flavors + listsize; f++) {