All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] nfsd: Fix a memory leak when meeting unsupported state_protect_how4
@ 2016-02-26 14:36 Kinglong Mee
  2016-02-26 16:01 ` J. Bruce Fields
  0 siblings, 1 reply; 2+ messages in thread
From: Kinglong Mee @ 2016-02-26 14:36 UTC (permalink / raw)
  To: J. Bruce Fields; +Cc: linux-nfs, kinglongmee

Remember free allocated client when meeting unsupported state protect how.

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


^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH] nfsd: Fix a memory leak when meeting unsupported state_protect_how4
  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
  0 siblings, 0 replies; 2+ messages in thread
From: J. Bruce Fields @ 2016-02-26 16:01 UTC (permalink / raw)
  To: Kinglong Mee; +Cc: linux-nfs

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

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2016-02-26 16:01 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
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 is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.