summaryrefslogtreecommitdiffstats
path: root/fs/nfsd/nfs4xdr.c
diff options
context:
space:
mode:
authorNeilBrown <neilb@suse.com>2016-12-21 04:32:19 +0100
committerJ. Bruce Fields <bfields@redhat.com>2017-01-31 18:31:53 +0100
commite35659f1b03c03946cae8abb6b0a9e170b574f1c (patch)
treeba9fb17ace3dc51afa835d969a7bca22be30533c /fs/nfsd/nfs4xdr.c
parentsvcrpc: free contexts immediately on PROC_DESTROY (diff)
downloadlinux-e35659f1b03c03946cae8abb6b0a9e170b574f1c.tar.xz
linux-e35659f1b03c03946cae8abb6b0a9e170b574f1c.zip
NFSD: correctly range-check v4.x minor version when setting versions.
Writing to /proc/fs/nfsd/versions allows individual major versions and NFSv4 minor versions to be enabled or disabled. However NFSv4.0 cannot currently be disabled, thought there is no good reason. Also the minor number is parsed as a 'long' but used as an 'int' so '4294967297' will be incorrectly treated as '1'. This patch removes the test on 'minor == 0' and switches to kstrtouint() to get correct range checking. When reading from /proc/fs/nfsd/versions, 4.0 is current not reported. To allow the disabling for v4.0 to be visible, while maintaining backward compatibility, change code to report "-4.0" if appropriate, but not "+4.0". Signed-off-by: NeilBrown <neilb@suse.com> Signed-off-by: J. Bruce Fields <bfields@redhat.com>
Diffstat (limited to 'fs/nfsd/nfs4xdr.c')
0 files changed, 0 insertions, 0 deletions