• Chuck Lever's avatar
    NFSD: Fix .pc_release method for NFSv2 · 1841b9b6
    Chuck Lever authored
    nfsd_release_fhandle() assumes that rqstp->rq_resp always points to
    an nfsd_fhandle struct. In fact, no NFSv2 procedure uses struct
    nfsd_fhandle as its response structure.
    
    So far that has been "safe" to do because the res structs put the
    resp->fh field at that same offset as struct nfsd_fhandle. I don't
    think that's a guarantee, though, and there is certainly nothing
    preventing a developer from altering the fields in those structures.
    Signed-off-by: default avatarChuck Lever <chuck.lever@oracle.com>
    Signed-off-by: default avatarJ. Bruce Fields <bfields@redhat.com>
    1841b9b6
nfsproc.c 21.6 KB