Linux NFS development
 help / color / mirror / Atom feed
From: "J. Bruce Fields" <bfields@fieldses.org>
To: Kinglong Mee <kinglongmee@gmail.com>
Cc: Linux NFS Mailing List <linux-nfs@vger.kernel.org>
Subject: Re: [PATCH] NFSD: Using type of uint32_t for ex_nflavors instead of int
Date: Tue, 27 May 2014 11:47:00 -0400	[thread overview]
Message-ID: <20140527154700.GB21989@fieldses.org> (raw)
In-Reply-To: <53801179.8080502@gmail.com>

On Sat, May 24, 2014 at 11:26:49AM +0800, Kinglong Mee wrote:
> ex_nflavors can't be negative number, just defined by uint32_t.

OK, applying for 3.16.--b.

> 
> Signed-off-by: Kinglong Mee <kinglongmee@gmail.com>
> ---
>  fs/nfsd/export.c | 7 ++++---
>  fs/nfsd/export.h | 2 +-
>  2 files changed, 5 insertions(+), 4 deletions(-)
> 
> diff --git a/fs/nfsd/export.c b/fs/nfsd/export.c
> index 8513c59..9343ae2 100644
> --- a/fs/nfsd/export.c
> +++ b/fs/nfsd/export.c
> @@ -437,13 +437,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++) {
> diff --git a/fs/nfsd/export.h b/fs/nfsd/export.h
> index d7939a6..11d03b9 100644
> --- a/fs/nfsd/export.h
> +++ b/fs/nfsd/export.h
> @@ -53,7 +53,7 @@ struct svc_export {
>  	int			ex_fsid;
>  	unsigned char *		ex_uuid; /* 16 byte fsid */
>  	struct nfsd4_fs_locations ex_fslocs;
> -	int			ex_nflavors;
> +	uint32_t		ex_nflavors;
>  	struct exp_flavor_info	ex_flavors[MAX_SECINFO_LIST];
>  	struct cache_detail	*cd;
>  };
> -- 
> 1.9.3
> 

      reply	other threads:[~2014-05-27 15:47 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-05-24  3:26 [PATCH] NFSD: Using type of uint32_t for ex_nflavors instead of int Kinglong Mee
2014-05-27 15:47 ` J. Bruce Fields [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20140527154700.GB21989@fieldses.org \
    --to=bfields@fieldses.org \
    --cc=kinglongmee@gmail.com \
    --cc=linux-nfs@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox