• Chuck Lever's avatar
    NFSD: Stricter buffer size checking in write_versions() · 261758b5
    Chuck Lever authored
    While it's not likely today that there are enough NFS versions to
    overflow the output buffer in write_versions(), we should be more
    careful about detecting the end of the buffer.
    
    The number of NFS versions will only increase as NFSv4 minor versions
    are added.
    
    Note that this API doesn't behave the same as portlist.  Here we
    attempt to display as many versions as will fit in the buffer, and do
    not provide any indication that an overflow would have occurred.  I
    don't have any good rationale for that.
    Signed-off-by: default avatarChuck Lever <chuck.lever@oracle.com>
    Signed-off-by: default avatarJ. Bruce Fields <bfields@citi.umich.edu>
    261758b5
nfsctl.c 36.1 KB