From: Kinglong Mee Date: Mon, 23 Dec 2013 09:31:21 +0000 (+0800) Subject: NFSD: fix a leak which can cause CREATE_SESSION failures X-Git-Tag: v3.14-rc1~44^2~23 X-Git-Url: https://asedeno.scripts.mit.edu/gitweb/?a=commitdiff_plain;h=f403e450e85cd403b63fd163d29b6b7f5e8eaf77;p=linux.git NFSD: fix a leak which can cause CREATE_SESSION failures check_forechannel_attrs gets drc memory, so nfsd must put it when check_backchannel_attrs fails. After many requests with bad back channel attrs, nfsd will deny any client's CREATE_SESSION forever. A new test case named CSESS29 for pynfs will send in another mail. Signed-off-by: Kinglong Mee Signed-off-by: J. Bruce Fields --- diff --git a/fs/nfsd/nfs4state.c b/fs/nfsd/nfs4state.c index 1aed9be56414..9a6d088247fd 100644 --- a/fs/nfsd/nfs4state.c +++ b/fs/nfsd/nfs4state.c @@ -1915,7 +1915,7 @@ nfsd4_create_session(struct svc_rqst *rqstp, return status; status = check_backchannel_attrs(&cr_ses->back_channel); if (status) - return status; + goto out_release_drc_mem; status = nfserr_jukebox; new = alloc_session(&cr_ses->fore_channel); if (!new)