Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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>

authored by

Kinglong Mee and committed by
J. Bruce Fields
f403e450 2ce02b6b

+1 -1
+1 -1
fs/nfsd/nfs4state.c
··· 1915 1915 return status; 1916 1916 status = check_backchannel_attrs(&cr_ses->back_channel); 1917 1917 if (status) 1918 - return status; 1918 + goto out_release_drc_mem; 1919 1919 status = nfserr_jukebox; 1920 1920 new = alloc_session(&cr_ses->fore_channel); 1921 1921 if (!new)