Skip to contentSkip to conversation

NFSD: fix a bug which causing nfsd deny CREATE_SESSION

PATCH In review Kinglong Mee 2 participants 2 messages Dec 23, 2013 – Jan 3, 2014

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 NFSD: fix a bug which causing nfsd deny CREATE_SESSION

check_forechannel_attrs have get drc memory, nfsd must put it when check_backchannel_attrs failed.

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.

---
 fs/nfsd/nfs4state.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
fs/nfsd/nfs4state.c +1 -1
index 105d6fa..4e2c9ba 100644
@@ -1913,7 +1913,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)
Signature · 1 line
1.8.4.2
#1 lore raw
Quoted 5 lines · Kinglong Mee

check_forechannel_attrs have get drc memory, nfsd must put it when check_backchannel_attrs failed.

After many requests with bad back channel attrs, nfsd will deny any client's CREATE_SESSION forever.

Thanks, applying.--b.

Quoted 23 lines

A new test case named CSESS29 for pynfs will send in another mail.

---
 fs/nfsd/nfs4state.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
fs/nfsd/nfs4state.c +1 -1
index 105d6fa..4e2c9ba 100644
@@ -1913,7 +1913,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)
Signature · 1 line
1.8.4.2