Commit 1f53146d authored by Kinglong Mee's avatar Kinglong Mee Committed by J. Bruce Fields

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: default avatarKinglong Mee <kinglongmee@gmail.com>
Signed-off-by: default avatarJ. Bruce Fields <bfields@redhat.com>
parent f0db79d5
...@@ -438,13 +438,14 @@ fsloc_parse(char **mesg, char *buf, struct nfsd4_fs_locations *fsloc) ...@@ -438,13 +438,14 @@ fsloc_parse(char **mesg, char *buf, struct nfsd4_fs_locations *fsloc)
static int secinfo_parse(char **mesg, char *buf, struct svc_export *exp) static int secinfo_parse(char **mesg, char *buf, struct svc_export *exp)
{ {
int listsize, err;
struct exp_flavor_info *f; struct exp_flavor_info *f;
u32 listsize;
int err;
err = get_int(mesg, &listsize); err = get_uint(mesg, &listsize);
if (err) if (err)
return err; return err;
if (listsize < 0 || listsize > MAX_SECINFO_LIST) if (listsize > MAX_SECINFO_LIST)
return -EINVAL; return -EINVAL;
for (f = exp->ex_flavors; f < exp->ex_flavors + listsize; f++) { for (f = exp->ex_flavors; f < exp->ex_flavors + listsize; f++) {
......
...@@ -54,7 +54,7 @@ struct svc_export { ...@@ -54,7 +54,7 @@ struct svc_export {
int ex_fsid; int ex_fsid;
unsigned char * ex_uuid; /* 16 byte fsid */ unsigned char * ex_uuid; /* 16 byte fsid */
struct nfsd4_fs_locations ex_fslocs; struct nfsd4_fs_locations ex_fslocs;
int ex_nflavors; uint32_t ex_nflavors;
struct exp_flavor_info ex_flavors[MAX_SECINFO_LIST]; struct exp_flavor_info ex_flavors[MAX_SECINFO_LIST];
struct cache_detail *cd; struct cache_detail *cd;
}; };
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment