Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit f403e450 authored by Kinglong Mee's avatar Kinglong Mee Committed by J. Bruce Fields
Browse files

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: default avatarKinglong Mee <kinglongmee@gmail.com>
Signed-off-by: default avatarJ. Bruce Fields <bfields@redhat.com>
parent 2ce02b6b
Loading
Loading
Loading
Loading
+1 −1
Original line number Original line Diff line number Diff line
@@ -1915,7 +1915,7 @@ nfsd4_create_session(struct svc_rqst *rqstp,
		return status;
		return status;
	status = check_backchannel_attrs(&cr_ses->back_channel);
	status = check_backchannel_attrs(&cr_ses->back_channel);
	if (status)
	if (status)
		return status;
		goto out_release_drc_mem;
	status = nfserr_jukebox;
	status = nfserr_jukebox;
	new = alloc_session(&cr_ses->fore_channel);
	new = alloc_session(&cr_ses->fore_channel);
	if (!new)
	if (!new)