linux-nfs.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "J. Bruce Fields" <bfields@fieldses.org>
To: Kinglong Mee <kinglongmee@gmail.com>
Cc: "linux-nfs@vger.kernel.org" <linux-nfs@vger.kernel.org>
Subject: Re: [PATCH] nfsd: Fix a memory leak when meeting unsupported state_protect_how4
Date: Fri, 26 Feb 2016 11:01:41 -0500	[thread overview]
Message-ID: <20160226160141.GB7760@fieldses.org> (raw)
In-Reply-To: <56D062FA.7090605@gmail.com>

On Fri, Feb 26, 2016 at 10:36:42PM +0800, Kinglong Mee wrote:
> Remember free allocated client when meeting unsupported state protect how.

Thanks for catching that!

Impact looks minimal for now as it's a leak in a case no current client
exercises, as far as I know.

Queueing up for 4.5.

--b.

> 
> Fixes: 50c7b948adbd ("nfsd: minor consolidation of mach_cred handling code")
> Signed-off-by: Kinglong Mee <kinglongmee@gmail.com>
> ---
>  fs/nfsd/nfs4state.c | 3 ++-
>  1 file changed, 2 insertions(+), 1 deletion(-)
> 
> diff --git a/fs/nfsd/nfs4state.c b/fs/nfsd/nfs4state.c
> index c484a2b..9d20c6a 100644
> --- a/fs/nfsd/nfs4state.c
> +++ b/fs/nfsd/nfs4state.c
> @@ -2408,7 +2408,8 @@ nfsd4_exchange_id(struct svc_rqst *rqstp,
>  	default:				/* checked by xdr code */
>  		WARN_ON_ONCE(1);
>  	case SP4_SSV:
> -		return nfserr_encr_alg_unsupp;
> +		status = nfserr_encr_alg_unsupp;
> +		goto out_nolock;
>  	}
>  
>  	/* Cases below refer to rfc 5661 section 18.35.4: */
> -- 
> 2.5.0

      reply	other threads:[~2016-02-26 16:01 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-02-26 14:36 [PATCH] nfsd: Fix a memory leak when meeting unsupported state_protect_how4 Kinglong Mee
2016-02-26 16:01 ` 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=20160226160141.GB7760@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;
as well as URLs for NNTP newsgroup(s).