瀏覽代碼

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 <kinglongmee@gmail.com>
Signed-off-by: J. Bruce Fields <bfields@redhat.com>
Kinglong Mee 11 年之前
父節點
當前提交
f403e450e8
共有 1 個文件被更改,包括 1 次插入1 次删除
  1. 1 1
      fs/nfsd/nfs4state.c

+ 1 - 1
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)